Skip to content

Commit 8818638

Browse files
committed
fix: 修复ts声明问题
1 parent 5ae8ff3 commit 8818638

File tree

5 files changed

+22
-6
lines changed

5 files changed

+22
-6
lines changed

docs/en/changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Change Log
2+
## 8.0.0-alpha5
3+
+ 🐞 Fix the typescript declaration problem.
4+
25
## 8.0.0-alpha4
36
`2021-09-13`
47
+ 🐞 Fix the problem that loading more does not take effect.

docs/zh-CN/changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# 更新日志
2+
## 8.0.0-alpha5
3+
+ 🐞 修复typescript声明问题。
4+
25
## 8.0.0-alpha4
36
`2021-09-13`
47
+ 🐞 修复加载更多不生效问题。

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "klinecharts",
3-
"version": "8.0.0-alpha4",
3+
"version": "8.0.0-alpha5",
44
"description": "Lightweight k-line chart built with html5 canvas",
55
"main": "index.js",
66
"types": "./types/index.d.ts",

types/Extension.d.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { ShapeTemplate } from './Shape';
2+
import { TechnicalIndicatorTemplate } from './TechnicalIndicator';
3+
4+
interface Extension {
5+
addTechnicalIndicatorTemplate: (template: TechnicalIndicatorTemplate | TechnicalIndicatorTemplate[]) => void;
6+
addShapeTemplate: (template: ShapeTemplate | ShapeTemplate[]) => void;
7+
}
8+
9+
export declare const extension: Extension;

types/index.d.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
import { extension } from './Extension';
2+
13
import {
24
KLineData, Precision, Viewport, OverlayEvent,
35
Coordinate, Point
46
} from './Common';
57

68
import { Chart, PictureType, ChartActionType } from './Chart';
9+
710
import {
811
ShapeMode, ShapeElementType,
912
ShapeDataSource, ShapeDataSourceItem,
@@ -12,6 +15,7 @@ import {
1215
ShapeEventPressMoveParams, ShapeEventMoveDrawingParams,
1316
ShapeDrawExtendParams
1417
} from './Shape';
18+
1519
import {
1620
AnnotationCheckParams,
1721
AnnotationDrawParams,
@@ -21,25 +25,22 @@ import {
2125
import { Tag } from './Tag';
2226

2327
import { PaneOptions } from './Pane';
28+
2429
import {
2530
TechnicalIndicatorPlotType,
2631
TechnicalIndicatorPlotCallbackDataItem, TechnicalIndicatorPlotCallbackData,
2732
TechnicalIndicatorPlot, TechnicalIndicatorRenderDataSource,
2833
TechnicalIndicator, TechnicalIndicatorRenderParams, TechnicalIndicatorTemplate
2934
} from './TechnicalIndicator';
3035

31-
export declare interface extension {
32-
addTechnicalIndicatorTemplate: (template: TechnicalIndicatorTemplate | TechnicalIndicatorTemplate[]) => void;
33-
addShapeTemplate: (template: ShapeTemplate | ShapeTemplate[]) => void;
34-
}
35-
3636
export declare function version(): string;
3737

3838
export declare function init(ds: HTMLDivElement | string, style?: any): Chart | null;
3939

4040
export declare function dispose(dcs: HTMLDivElement | Chart | string): void;
4141

4242
export {
43+
extension,
4344
Chart, PictureType, ChartActionType,
4445
KLineData, Precision, Viewport, OverlayEvent, PaneOptions,
4546
Coordinate, Point,

0 commit comments

Comments
 (0)