Skip to content

Commit

Permalink
Added file extensions to the import paths
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-rachita committed Jan 30, 2025
1 parent 1e95744 commit f966662
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion types/element.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AnnotationOptions } from './options';
import { AnnotationOptions } from './options.js';

export interface AnnotationBoxModel {
x: number,
Expand Down
2 changes: 1 addition & 1 deletion types/events.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Chart, ChartEvent } from 'chart.js';
import { AnnotationElement } from './element';
import { AnnotationElement } from './element.js';

export interface EventContext {
chart: Chart,
Expand Down
12 changes: 6 additions & 6 deletions types/index.d.ts
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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';
4 changes: 2 additions & 2 deletions types/label.d.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
6 changes: 3 additions & 3 deletions types/options.d.ts
Original file line number Diff line number Diff line change
@@ -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;

Expand Down

0 comments on commit f966662

Please sign in to comment.