From de7b926aae157fd311fea98901520fc0637f3d1d Mon Sep 17 00:00:00 2001 From: Thibault NORMAND Date: Sat, 9 Nov 2024 06:11:09 +0100 Subject: [PATCH] Fix typescript build lib target (#715) * chore(dep): run npm audit fix. * fix(tsc): error in type definition. * chore(dep): rollback npm audit breaking webpack. --- src/graph_notebook/widgets/package.json | 2 +- src/graph_notebook/widgets/src/types.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/graph_notebook/widgets/package.json b/src/graph_notebook/widgets/package.json index 84aa9dbe..4dda4e71 100644 --- a/src/graph_notebook/widgets/package.json +++ b/src/graph_notebook/widgets/package.json @@ -53,7 +53,7 @@ "source-map-loader": "0.2.4", "style-loader": "1.2.1", "ts-loader": "5.4.5", - "typescript": "4.1.6", + "typescript": "5.6.3", "webpack": "4.43.0", "webpack-cli": "3.3.11", "webpack-dev-server": "3.11.0" diff --git a/src/graph_notebook/widgets/src/types.ts b/src/graph_notebook/widgets/src/types.ts index ad67a25c..e603b3a8 100644 --- a/src/graph_notebook/widgets/src/types.ts +++ b/src/graph_notebook/widgets/src/types.ts @@ -34,7 +34,7 @@ export class VisNode implements Node, DynamicObject { [key: string]: any; - constructor(readonly id: string) { + constructor(id: string) { this.id = id; } @@ -88,9 +88,9 @@ export class VisEdge implements Edge { [key: string]: any; constructor( - readonly from: string, - readonly to: string, - readonly id: string, + from: string, + to: string, + id: string, label: string ) { this.from = from; @@ -184,7 +184,7 @@ export class IdentifiableDynamicObject extends DynamicObject { [key: string]: any; - constructor(readonly id: string) { + constructor(id: string) { super(); this.id = id; }