Skip to content

Commit a7bbabd

Browse files
Luiz Corte Realelo7-developer
Luiz Corte Real
authored andcommitted
Inline estree-walker type definitions in compiler.d.ts
1 parent 3bbfccc commit a7bbabd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rollup.config.js

+2-1
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 * 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)