improve types

pull/11241/head
Jeremiasz Major 2 years ago
parent a09d68dc43
commit 6890743dfb
No known key found for this signature in database
GPG Key ID: 482514409C7EBE01

@ -12,6 +12,7 @@ export default function read_options(node) {
const component_options = { const component_options = {
start: node.start, start: node.start,
end: node.end, end: node.end,
// @ts-ignore
attributes: node.attributes attributes: node.attributes
}; };

@ -64,6 +64,7 @@ export function read_script(parser, start, attributes) {
context: get_context(attributes), context: get_context(attributes),
content: ast, content: ast,
parent: null, parent: null,
// @ts-ignore
attributes: attributes attributes: attributes
}; };
} }

@ -93,7 +93,7 @@ export interface SvelteOptions {
*/ */
extend?: ArrowFunctionExpression | Identifier; extend?: ArrowFunctionExpression | Identifier;
}; };
attributes: Array<Attribute | SpreadAttribute | Directive>; attributes: Attribute[];
} }
/** Static text */ /** Static text */
@ -468,7 +468,7 @@ export interface Script extends BaseNode {
type: 'Script'; type: 'Script';
context: string; context: string;
content: Program; content: Program;
attributes: Array<Attribute | SpreadAttribute | Directive>; attributes: Attribute[];
} }
declare module 'estree' { declare module 'estree' {

@ -1316,7 +1316,7 @@ declare module 'svelte/compiler' {
*/ */
extend?: ArrowFunctionExpression | Identifier; extend?: ArrowFunctionExpression | Identifier;
}; };
attributes: Array<Attribute | SpreadAttribute | Directive>; attributes: Attribute[];
} }
/** Static text */ /** Static text */
@ -1691,7 +1691,7 @@ declare module 'svelte/compiler' {
type: 'Script'; type: 'Script';
context: string; context: string;
content: Program; content: Program;
attributes: Array<Attribute | SpreadAttribute | Directive>; attributes: Attribute[];
} }
/** /**
* The result of a preprocessor run. If the preprocessor does not return a result, it is assumed that the code is unchanged. * The result of a preprocessor run. If the preprocessor does not return a result, it is assumed that the code is unchanged.

Loading…
Cancel
Save