File tree Expand file tree Collapse file tree 2 files changed +3
-10
lines changed
packages/svelte/src/compiler/phases
2-analyze/visitors/shared
3-transform/client/visitors/shared Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Original file line number Diff line number Diff line change 11/** @import { AssignmentExpression, PropertyDefinition, Expression } from 'estree' */
22/** @import { AST } from '#compiler' */
33/** @import { Context } from '../../types' */
4+ /** @import { StateCreationRuneName } from '../../../../../utils.js' */
45
56import { get_parent } from '../../../../utils/ast.js' ;
67import { get_rune } from '../../../scope.js' ;
78import * as e from '../../../../errors.js' ;
89import { locate_node } from '../../../../state.js' ;
910import { is_state_creation_rune } from '../../../../../utils.js' ;
1011
11- /** @typedef {'$state' | '$state.raw' | '$derived' | '$derived.by' | 'regular' } PropertyAssignmentType */
12+ /** @typedef { StateCreationRuneName | 'regular' } PropertyAssignmentType */
1213/** @typedef {{ type: PropertyAssignmentType; node: AssignmentExpression | PropertyDefinition; } } PropertyAssignmentDetails */
1314
1415const reassignable_assignments = new Set ( [ '$state' , '$state.raw' , 'regular' ] ) ;
1516
16- const property_assignment_types = new Set ( [
17- '$state' ,
18- '$state.raw' ,
19- '$derived' ,
20- '$derived.by' ,
21- 'regular'
22- ] ) ;
23-
2417export class ClassAnalysis {
2518 // TODO: Probably need to include property definitions here too
2619 /** @type {Map<string, PropertyAssignmentDetails> } */
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ export class ClassAnalysis {
121121
122122 const rune = get_rune ( node . right , context . state . scope ) ;
123123 if ( ! rune || ! is_state_creation_rune ( rune ) ) {
124- return false ;
124+ return ;
125125 }
126126
127127 const id = this . #deconflict( name ) ;
You can’t perform that action at this time.
0 commit comments