From a7bbabd6b201272dd5e8c7ae2f382a148e24b38f Mon Sep 17 00:00:00 2001 From: Luiz Corte Real Date: Fri, 16 Aug 2019 10:21:29 -0300 Subject: [PATCH] Inline estree-walker type definitions in compiler.d.ts --- rollup.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rollup.config.js b/rollup.config.js index 8c3068dcbd..7cce25e24c 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -20,7 +20,8 @@ const ts_plugin = is_publish const external = id => id.startsWith('svelte/'); -fs.writeFileSync(`./compiler.d.ts`, `export * from './types/compiler/index';`); +const inlined_estree = fs.readFileSync('./node_modules/estree-walker/index.d.ts', 'utf-8').replace(/declare.*\{((.|[\n\r])+)\}/m, '$1'); +fs.writeFileSync(`./compiler.d.ts`, `export { compile, parse, preprocess, VERSION } from './types/compiler/index';\n${inlined_estree}`); export default [ /* runtime */