Skip to content

Commit 03ec167

Browse files
committed
refactor: enable isolatedDeclarations
1 parent c62f6e4 commit 03ec167

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

src/esbuild.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ import unplugin from './index'
1919
* })
2020
* ```
2121
*/
22-
const esbuild = unplugin.esbuild
22+
const esbuild = unplugin.esbuild as typeof unplugin.esbuild
2323
export default esbuild
2424
export { esbuild as 'module.exports' }

src/rollup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ import unplugin from './index'
1919
* }
2020
* ```
2121
*/
22-
const rollup = unplugin.rollup
22+
const rollup = unplugin.rollup as typeof unplugin.rollup
2323
export default rollup
2424
export { rollup as 'module.exports' }

src/vite.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ import unplugin from './index'
1919
* })
2020
* ```
2121
*/
22-
const vite = unplugin.vite
22+
const vite = unplugin.vite as typeof unplugin.vite
2323
export default vite
2424
export { vite as 'module.exports' }

src/webpack.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ import unplugin from './index'
1717
* }
1818
* ```
1919
*/
20-
const webpack = unplugin.webpack
20+
const webpack = unplugin.webpack as typeof unplugin.webpack
2121
export default webpack
2222
export { webpack as 'module.exports' }

tsconfig.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
{
22
"compilerOptions": {
33
"target": "esnext",
4-
"jsx": "preserve",
54
"lib": ["es2022"],
6-
"module": "esnext",
5+
"moduleDetection": "force",
6+
"module": "preserve",
77
"moduleResolution": "bundler",
88
"resolveJsonModule": true,
99
"types": ["node"],
1010
"strict": true,
1111
"noUnusedLocals": true,
12+
"declaration": true,
13+
"isolatedDeclarations": true,
1214
"esModuleInterop": true,
1315
"isolatedModules": true,
16+
"verbatimModuleSyntax": true,
1417
"skipLibCheck": true
1518
},
1619
"include": ["src", "tests"],

0 commit comments

Comments
 (0)