pull/10063/head
Dominic Gannaway 3 years ago
parent 93cce4a2c3
commit 67142a52d1

@ -746,7 +746,13 @@ declare module 'svelte/compiler' {
* What the value was initialized with. * What the value was initialized with.
* For destructured props such as `let { foo = 'bar' } = $props()` this is `'bar'` and not `$props()` * For destructured props such as `let { foo = 'bar' } = $props()` this is `'bar'` and not `$props()`
*/ */
initial: null | Expression | FunctionDeclaration | ClassDeclaration | ImportDeclaration | EachBlock; initial:
| null
| Expression
| FunctionDeclaration
| ClassDeclaration
| ImportDeclaration
| EachBlock;
is_called: boolean; is_called: boolean;
references: { node: Identifier; path: SvelteNode[] }[]; references: { node: Identifier; path: SvelteNode[] }[];
mutated: boolean; mutated: boolean;
@ -975,15 +981,15 @@ declare module 'svelte/compiler' {
filename?: string | undefined; filename?: string | undefined;
} | undefined): Promise<Processed>; } | undefined): Promise<Processed>;
export class CompileError extends Error { export class CompileError extends Error {
constructor(code: string, message: string, position: [number, number] | undefined); constructor(code: string, message: string, position: [number, number] | undefined);
filename: CompileError_1['filename']; filename: CompileError_1['filename'];
position: CompileError_1['position']; position: CompileError_1['position'];
start: CompileError_1['start']; start: CompileError_1['start'];
end: CompileError_1['end']; end: CompileError_1['end'];
code: string; code: string;
} }
@ -994,9 +1000,9 @@ declare module 'svelte/compiler' {
* */ * */
export const VERSION: string; export const VERSION: string;
class Scope { class Scope {
constructor(root: ScopeRoot, parent: Scope | null, porous: boolean); constructor(root: ScopeRoot, parent: Scope | null, porous: boolean);
root: ScopeRoot; root: ScopeRoot;
/** /**
* A map of every identifier declared by this scope, and all the * A map of every identifier declared by this scope, and all the
@ -1020,25 +1026,25 @@ declare module 'svelte/compiler' {
* which is usually an error. Block statements do not increase this value * which is usually an error. Block statements do not increase this value
*/ */
function_depth: number; function_depth: number;
declare(node: import('estree').Identifier, kind: Binding['kind'], declaration_kind: DeclarationKind, initial?: null | import('estree').Expression | import('estree').FunctionDeclaration | import('estree').ClassDeclaration | import('estree').ImportDeclaration): Binding; declare(node: import('estree').Identifier, kind: Binding['kind'], declaration_kind: DeclarationKind, initial?: null | import('estree').Expression | import('estree').FunctionDeclaration | import('estree').ClassDeclaration | import('estree').ImportDeclaration | EachBlock): Binding;
child(porous?: boolean): Scope; child(porous?: boolean): Scope;
generate(preferred_name: string): string; generate(preferred_name: string): string;
get(name: string): Binding | null; get(name: string): Binding | null;
get_bindings(node: import('estree').VariableDeclarator | LetDirective): Binding[]; get_bindings(node: import('estree').VariableDeclarator | LetDirective): Binding[];
owner(name: string): Scope | null; owner(name: string): Scope | null;
reference(node: import('estree').Identifier, path: SvelteNode[]): void; reference(node: import('estree').Identifier, path: SvelteNode[]): void;
#private; #private;
} }
class ScopeRoot { class ScopeRoot {
conflicts: Set<string>; conflicts: Set<string>;
unique(preferred_name: string): import("estree").Identifier; unique(preferred_name: string): import("estree").Identifier;
} }
interface BaseNode { interface BaseNode {
@ -2567,4 +2573,4 @@ declare function $inspect<T extends any[]>(
...values: T ...values: T
): { with: (type: 'init' | 'update', ...values: T) => void }; ): { with: (type: 'init' | 'update', ...values: T) => void };
//# sourceMappingURL=index.d.ts.map //# sourceMappingURL=index.d.ts.map
Loading…
Cancel
Save