-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: typescript node next support (#10661)
- Loading branch information
Showing
12 changed files
with
157 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import {Chart} from '../dist/types'; | ||
import {Chart} from '../dist/types.js'; | ||
|
||
export * from '../dist/types'; | ||
export * from '../dist/types.js'; | ||
export default Chart; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export * from '../dist/helpers/types'; | ||
export * from '../dist/helpers.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"private": true, | ||
"type": "module", | ||
"description": "chart.js should work in node next typescript project", | ||
"dependencies": { | ||
"chart.js": "workspace:*", | ||
"typescript": "^4.7.4" | ||
}, | ||
"scripts": { | ||
"test": "tsc" | ||
}, | ||
"devDependencies": { | ||
"ts-expect": "^1.3.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* eslint-disable @typescript-eslint/no-explicit-any, no-console */ | ||
import {Chart} from 'chart.js'; | ||
import AutoChart from 'chart.js/auto'; | ||
import {debounce} from 'chart.js/helpers'; | ||
import {TypeOf, expectType} from 'ts-expect'; | ||
|
||
expectType<TypeOf<typeof Chart.register, any>>(false); | ||
expectType<TypeOf<typeof AutoChart.register, any>>(false); | ||
expectType<TypeOf<typeof debounce, any>>(false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"compilerOptions": { | ||
"moduleResolution": "NodeNext", | ||
"noEmit": true, | ||
"lib": ["es2018", "DOM"] | ||
}, | ||
"include": [ | ||
"./src/**/*.ts", | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"private": true, | ||
"type": "module", | ||
"description": "chart.js should work in node typescript project", | ||
"dependencies": { | ||
"chart.js": "workspace:*", | ||
"typescript": "^4.7.4" | ||
}, | ||
"scripts": { | ||
"test": "tsc" | ||
}, | ||
"devDependencies": { | ||
"ts-expect": "^1.3.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* eslint-disable @typescript-eslint/no-explicit-any, no-console */ | ||
import {Chart} from 'chart.js'; | ||
import AutoChart from 'chart.js/auto'; | ||
import {debounce} from 'chart.js/helpers'; | ||
import {TypeOf, expectType} from 'ts-expect'; | ||
|
||
expectType<TypeOf<typeof Chart.register, any>>(false); | ||
expectType<TypeOf<typeof AutoChart.register, any>>(false); | ||
expectType<TypeOf<typeof debounce, any>>(false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"compilerOptions": { | ||
"moduleResolution": "Node", | ||
"noEmit": true, | ||
"lib": ["es2018", "DOM"] | ||
}, | ||
"include": [ | ||
"./src/**/*.ts", | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters