pull/12780/head
Rich Harris 2 years ago
parent 46c63adbae
commit b8b07e0128

@ -639,7 +639,6 @@ export function client_module(analysis, options) {
options,
scope: analysis.module.scope,
scopes: analysis.module.scopes,
legacy_reactive_statements: new Map(),
public_state: new Map(),
private_state: new Map(),
transform: {},

@ -23,11 +23,6 @@ export interface ClientTransformState extends TransformState {
*/
readonly in_constructor: boolean;
/** Imports that should be re-evaluated in legacy mode following a mutation */
readonly legacy_reactive_imports: Statement[];
/** The $: calls, which will be ordered in the end */
readonly legacy_reactive_statements: Map<LabeledStatement, Statement>;
readonly transform: Record<
string,
{
@ -84,6 +79,12 @@ export interface ComponentClientTransformState extends ClientTransformState {
/** The anchor node for the current context */
readonly node: Identifier;
/** Imports that should be re-evaluated in legacy mode following a mutation */
readonly legacy_reactive_imports: Statement[];
/** The $: calls, which will be ordered in the end */
readonly legacy_reactive_statements: Map<LabeledStatement, Statement>;
}
export interface StateField {

@ -920,7 +920,6 @@ declare module 'svelte/compiler' {
* - `snippet`: A snippet parameter
* - `store_sub`: A $store value
* - `legacy_reactive`: A `$:` declaration
* - `legacy_reactive_import`: An imported binding that is mutated inside the component
*/
kind:
| 'normal'
@ -933,8 +932,7 @@ declare module 'svelte/compiler' {
| 'each'
| 'snippet'
| 'store_sub'
| 'legacy_reactive'
| 'legacy_reactive_import';
| 'legacy_reactive';
declaration_kind: DeclarationKind;
/**
* What the value was initialized with.
@ -1733,6 +1731,7 @@ declare module 'svelte/compiler' {
interface Component extends BaseElement {
type: 'Component';
metadata: {
scopes: Record<string, Scope>;
dynamic: boolean;
};
}
@ -1769,6 +1768,9 @@ declare module 'svelte/compiler' {
type: 'SvelteComponent';
name: 'svelte:component';
expression: Expression;
metadata: {
scopes: Record<string, Scope>;
};
}
interface SvelteDocument extends BaseElement {
@ -1814,6 +1816,9 @@ declare module 'svelte/compiler' {
interface SvelteSelf extends BaseElement {
type: 'SvelteSelf';
name: 'svelte:self';
metadata: {
scopes: Record<string, Scope>;
};
}
interface SvelteWindow extends BaseElement {

Loading…
Cancel
Save