@@ -48,55 +48,6 @@ export function client_component(source, analysis, options) {
48
48
scopes : analysis . template . scopes ,
49
49
hoisted : [ b . import_all ( '$' , 'svelte/internal/client' ) ] ,
50
50
node : /** @type {any } */ ( null ) , // populated by the root node
51
- // these should be set by create_block - if they're called outside, it's a bug
52
- get before_init ( ) {
53
- /** @type {any[] } */
54
- const a = [ ] ;
55
- a . push = ( ) => {
56
- throw new Error ( 'before_init.push should not be called outside create_block' ) ;
57
- } ;
58
- return a ;
59
- } ,
60
- get init ( ) {
61
- /** @type {any[] } */
62
- const a = [ ] ;
63
- a . push = ( ) => {
64
- throw new Error ( 'init.push should not be called outside create_block' ) ;
65
- } ;
66
- return a ;
67
- } ,
68
- get update ( ) {
69
- /** @type {any[] } */
70
- const a = [ ] ;
71
- a . push = ( ) => {
72
- throw new Error ( 'update.push should not be called outside create_block' ) ;
73
- } ;
74
- return a ;
75
- } ,
76
- get after_update ( ) {
77
- /** @type {any[] } */
78
- const a = [ ] ;
79
- a . push = ( ) => {
80
- throw new Error ( 'after_update.push should not be called outside create_block' ) ;
81
- } ;
82
- return a ;
83
- } ,
84
- get template ( ) {
85
- /** @type {any[] } */
86
- const a = [ ] ;
87
- a . push = ( ) => {
88
- throw new Error ( 'template.push should not be called outside create_block' ) ;
89
- } ;
90
- return a ;
91
- } ,
92
- get locations ( ) {
93
- /** @type {any[] } */
94
- const a = [ ] ;
95
- a . push = ( ) => {
96
- throw new Error ( 'locations.push should not be called outside create_block' ) ;
97
- } ;
98
- return a ;
99
- } ,
100
51
legacy_reactive_statements : new Map ( ) ,
101
52
metadata : {
102
53
context : {
@@ -110,7 +61,15 @@ export function client_component(source, analysis, options) {
110
61
preserve_whitespace : options . preserveWhitespace ,
111
62
public_state : new Map ( ) ,
112
63
private_state : new Map ( ) ,
113
- in_constructor : false
64
+ in_constructor : false ,
65
+
66
+ // these are set inside the `Fragment` visitor, and cannot be used until then
67
+ before_init : /** @type {any } */ ( null ) ,
68
+ init : /** @type {any } */ ( null ) ,
69
+ update : /** @type {any } */ ( null ) ,
70
+ after_update : /** @type {any } */ ( null ) ,
71
+ template : /** @type {any } */ ( null ) ,
72
+ locations : /** @type {any } */ ( null )
114
73
} ;
115
74
116
75
const module = /** @type {import('estree').Program } */ (
0 commit comments