Skip to content

Commit 6813baf

Browse files
authoredOct 9, 2023
Fix types for TS files using ScratchCard
Actually, if you install the package and import it in a TS file, the types are not detected by Typescript and generate errors. `package.json` was missing the option `typings` to tell TS where to find the types.
1 parent 94f95cc commit 6813baf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

‎package.json

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.5.4",
44
"description": "Create scratch card in browser.",
55
"main": "./build/scratchcard.min.js",
6+
"typings": "./types/scratchcard-js.d.ts",
67
"scripts": {
78
"dev": "cross-env NODE_ENV=development concurrently \"webpack\" \"webpack-dev-server\" ",
89
"build": "webpack",

0 commit comments

Comments
 (0)
Failed to load comments.