From 1858abf517e46483a73fc58ac4c2b687c1759c98 Mon Sep 17 00:00:00 2001 From: Andrii Ovcharenko Date: Thu, 29 Aug 2024 17:49:03 +0200 Subject: [PATCH] add missing ts docs --- .size-limit.js | 10 +++++----- src/plugins/series-markers/primitive.ts | 20 +++++++------------- src/plugins/series-markers/types.ts | 2 ++ 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/.size-limit.js b/.size-limit.js index a362ff0062..93858aec68 100644 --- a/.size-limit.js +++ b/.size-limit.js @@ -8,7 +8,7 @@ export default [ { name: 'ESM', path: 'dist/lightweight-charts.production.mjs', - limit: '45.00 KB', + limit: '44.50 KB', import: '*', ignore: ['fancy-canvas'], brotli: true, @@ -16,7 +16,7 @@ export default [ { name: 'ESM createChart', path: 'dist/lightweight-charts.production.mjs', - limit: '45.00 KB', + limit: '41.30 KB', import: '{ createChart }', ignore: ['fancy-canvas'], brotli: true, @@ -24,7 +24,7 @@ export default [ { name: 'ESM createChartEx', path: 'dist/lightweight-charts.production.mjs', - limit: '45.00 KB', + limit: '40.00 KB', import: '{ createChartEx }', ignore: ['fancy-canvas'], brotli: true, @@ -32,7 +32,7 @@ export default [ { name: 'ESM Standalone', path: 'dist/lightweight-charts.standalone.production.mjs', - limit: '50.00 KB', + limit: '45.90 KB', import: '*', brotli: true, }, @@ -63,7 +63,7 @@ export default [ path: 'dist/lightweight-charts.production.mjs', import: '{ createSeriesMarkersPrimitive }', ignore: ['fancy-canvas'], - limit: '3.00 KB', + limit: '3.90 KB', brotli: true, }, ]; diff --git a/src/plugins/series-markers/primitive.ts b/src/plugins/series-markers/primitive.ts index b2670b200a..6be3acfb80 100644 --- a/src/plugins/series-markers/primitive.ts +++ b/src/plugins/series-markers/primitive.ts @@ -12,24 +12,12 @@ import { Logical, TimePointIndex } from '../../model/time-data'; import { UpdateType } from '../../views/pane/iupdatable-pane-view'; import { SeriesMarkersPaneView } from './pane-view'; -import { InternalSeriesMarker, SeriesMarkerPosition, SeriesMarkerShape } from './types'; +import { InternalSeriesMarker, MarkerPositions, SeriesMarker } from './types'; import { calculateAdjustedMargin, calculateShapeHeight, shapeMargin as calculateShapeMargin, } from './utils'; -interface SeriesMarker { - time: TimeType; - position: SeriesMarkerPosition; - shape: SeriesMarkerShape; - color: string; - id?: string; - text?: string; - size?: number; - originalTime?: TimeType; -} - -type MarkerPositions = Record; class SeriesMarkersPrimitive implements ISeriesPrimitive { private _attached: SeriesAttachedParameter | null = null; @@ -206,6 +194,12 @@ class SeriesMarkersPrimitive implements ISeriesPrimitive { originalTime: unknown; } +export type MarkerPositions = Record; + export interface InternalSeriesMarker extends SeriesMarker { internalId: number; }