Skip to content

Commit 66e23ee

Browse files
author
Simon Holthausen
committed
Inline estree-walker type definitions in compiler.d.ts
fixes sveltejs#3397
1 parent cc3c7fa commit 66e23ee

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rollup.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ const ts_plugin = is_publish
2020

2121
const external = id => id.startsWith('svelte/');
2222

23-
fs.writeFileSync(`./compiler.d.ts`, `export { compile, parse, preprocess, VERSION } from './types/compiler/index';`);
23+
const inlined_estree = fs.readFileSync('./node_modules/estree-walker/index.d.ts', 'utf-8').replace(/declare.*\{((.|[\n\r])+)\}/m, '$1');
24+
fs.writeFileSync(`./compiler.d.ts`, `export { compile, parse, preprocess, VERSION } from './types/compiler/index';\n${inlined_estree}`);
2425

2526
export default [
2627
/* runtime */

0 commit comments

Comments
 (0)