Skip to content

Commit 605c6e7

Browse files
committed
use tsc for types because that works ig
1 parent 71c1dbd commit 605c6e7

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed

.eslintrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,12 @@ module.exports = {
2828
project: './tsconfig.json',
2929
},
3030
},
31+
{
32+
files: ['example/**/*.ts', 'example/**/*.tsx'],
33+
extends: ['airbnb-typescript'],
34+
parserOptions: {
35+
project: './example/tsconfig.json',
36+
},
37+
},
3138
],
3239
};

example/tsconfig.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"compilerOptions": {
3+
"lib": ["dom", "es2020"],
4+
"jsx": "react-jsx",
5+
"noEmit": true,
6+
"esModuleInterop": true,
7+
"skipLibCheck": true
8+
},
9+
"include": ["*.tsx", "*.ts"]
10+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"url": "git+https://github.com/u-wave/react-youtube.git"
6363
},
6464
"scripts": {
65-
"build": "tsup src/index.tsx --format esm,cjs --experimental-dts",
65+
"build": "tsup src/index.tsx --format esm,cjs && tsc --declaration --emitDeclarationOnly -p .",
6666
"docs": "prop-types-table src/index.js | md-insert README.md --header Props -i",
6767
"example": "npm run --prefix example start",
6868
"browserslist": "npx browserslist --mobile-to-desktop '> 0.5%, last 2 versions, Firefox ESR, not dead, not IE 11' > .browserslistrc",

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"compilerOptions": {
33
"lib": ["dom", "es2020"],
4-
"noEmit": true,
54
"jsx": "react-jsx",
5+
"outDir": "dist",
66
"esModuleInterop": true,
77
"skipLibCheck": true
88
},
9-
"include": ["src/*.tsx", "src/*.ts", "example/*.tsx"]
9+
"include": ["src/*.tsx", "src/*.ts"]
1010
}

0 commit comments

Comments
 (0)