fix: playground warnings (#12394)

pull/12397/head
Paolo Ricciuti 6 months ago committed by GitHub
parent 1d76ccf288
commit 2cee6fb141
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -76,7 +76,7 @@ function compile({ id, source, options, return_ast }) {
js: js.code, js: js.code,
css: css?.code || `/* Add a <sty` + `le> tag to see compiled CSS */`, css: css?.code || `/* Add a <sty` + `le> tag to see compiled CSS */`,
error: null, error: null,
warnings, warnings: warnings.map((warning) => warning.toJSON()),
metadata, metadata,
ast ast
} }
@ -95,7 +95,7 @@ function compile({ id, source, options, return_ast }) {
js: compiled.js.code, js: compiled.js.code,
css, css,
error: null, error: null,
warnings: compiled.warnings, warnings: compiled.warnings.map((warning) => warning.toJSON()),
metadata: compiled.metadata metadata: compiled.metadata
} }
}; };

@ -12,9 +12,9 @@ export type CompileMessageData = {
js: string; js: string;
css: string; css: string;
ast?: import('svelte/types/compiler/interfaces').Ast; ast?: import('svelte/types/compiler/interfaces').Ast;
}; metadata?: {
metadata?: { runes: boolean;
runes: boolean; };
}; };
}; };

Loading…
Cancel
Save