From f966662e310a3a51b1544031c27f7a3e0eae56d9 Mon Sep 17 00:00:00 2001 From: "robert.rachita" Date: Thu, 30 Jan 2025 10:23:38 +0100 Subject: [PATCH] Added file extensions to the import paths --- types/element.d.ts | 2 +- types/events.d.ts | 2 +- types/index.d.ts | 12 ++++++------ types/label.d.ts | 4 ++-- types/options.d.ts | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/types/element.d.ts b/types/element.d.ts index 8ed43be07..4f51257c7 100644 --- a/types/element.d.ts +++ b/types/element.d.ts @@ -1,4 +1,4 @@ -import { AnnotationOptions } from './options'; +import { AnnotationOptions } from './options.js'; export interface AnnotationBoxModel { x: number, diff --git a/types/events.d.ts b/types/events.d.ts index 996d29664..4be79872e 100644 --- a/types/events.d.ts +++ b/types/events.d.ts @@ -1,5 +1,5 @@ import { Chart, ChartEvent } from 'chart.js'; -import { AnnotationElement } from './element'; +import { AnnotationElement } from './element.js'; export interface EventContext { chart: Chart, diff --git a/types/index.d.ts b/types/index.d.ts index be987e2f8..ff00f49a9 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -1,6 +1,6 @@ import { Chart, ChartType, Plugin } from 'chart.js'; -import { AnnotationPluginOptions, BoxAnnotationOptions, EllipseAnnotationOptions, LabelAnnotationOptions, LineAnnotationOptions, PointAnnotationOptions, PolygonAnnotationOptions, DoughnutLabelAnnotationOptions } from './options'; -import { AnnotationElement } from './element'; +import { AnnotationPluginOptions, BoxAnnotationOptions, EllipseAnnotationOptions, LabelAnnotationOptions, LineAnnotationOptions, PointAnnotationOptions, PolygonAnnotationOptions, DoughnutLabelAnnotationOptions } from './options.js'; +import { AnnotationElement } from './element.js'; declare module 'chart.js' { // eslint-disable-next-line @typescript-eslint/no-unused-vars @@ -25,7 +25,7 @@ declare const Annotation: Plugin & { export default Annotation; -export * from './element'; -export * from './events'; -export * from './label'; -export * from './options'; +export * from './element.js'; +export * from './events.js'; +export * from './label.js'; +export * from './options.js'; diff --git a/types/label.d.ts b/types/label.d.ts index 4180e7fee..7891abe04 100644 --- a/types/label.d.ts +++ b/types/label.d.ts @@ -1,6 +1,6 @@ import { Color, FontSpec, BorderRadius } from 'chart.js'; -import { PartialEventContext } from './events'; -import { DrawTime, Scriptable, ShadowOptions } from './options'; +import { PartialEventContext } from './events.js'; +import { DrawTime, Scriptable, ShadowOptions } from './options.js'; type percentString = `${number}%`; export type LabelPosition = 'start' | 'center' | 'end' | percentString; diff --git a/types/options.d.ts b/types/options.d.ts index 86e31ca7e..1b717ffdc 100644 --- a/types/options.d.ts +++ b/types/options.d.ts @@ -1,7 +1,7 @@ import { Chart, Color, PointStyle, BorderRadius, CoreInteractionOptions } from 'chart.js'; -import { AnnotationEvents, PartialEventContext, EventContext } from './events'; -import { LabelOptions, BoxLabelOptions, LabelTypeOptions, DoughnutLabelOptions } from './label'; -import { AnnotationBoxModel, AnnotationElement } from './element'; +import { AnnotationEvents, PartialEventContext, EventContext } from './events.js'; +import { LabelOptions, BoxLabelOptions, LabelTypeOptions, DoughnutLabelOptions } from './label.js'; +import { AnnotationBoxModel, AnnotationElement } from './element.js'; export type DrawTime = 'afterDraw' | 'afterDatasetsDraw' | 'beforeDraw' | 'beforeDatasetsDraw' | number;