File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
packages/svelte/src/runtime/internal Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -84,15 +84,25 @@ function make_dirty(component, i) {
84
84
component . $$ . dirty [ ( i / 31 ) | 0 ] |= 1 << i % 31 ;
85
85
}
86
86
87
- /** @returns {void } */
87
+ // TODO: Document the other params
88
+ /**
89
+ * @param {SvelteComponent } component
90
+ * @param {import('./public.js').ComponentConstructorOptions } options
91
+ *
92
+ * @param {import('./utils.js')['not_equal'] } not_equal Used to compare props and state values.
93
+ * @param {(target: Element | ShadowRoot) => void } [append_styles] Function that appends styles to the DOM when the component is first initialised.
94
+ * This will be the `add_css` function from the compiled component.
95
+ *
96
+ * @returns {void }
97
+ */
88
98
export function init (
89
99
component ,
90
100
options ,
91
101
instance ,
92
102
create_fragment ,
93
103
not_equal ,
94
104
props ,
95
- append_styles ,
105
+ append_styles = null ,
96
106
dirty = [ - 1 ]
97
107
) {
98
108
const parent_component = current_component ;
@@ -139,8 +149,9 @@ export function init(
139
149
if ( options . target ) {
140
150
if ( options . hydrate ) {
141
151
start_hydrating ( ) ;
152
+ // TODO: what is the correct type here?
153
+ // @ts -expect-error
142
154
const nodes = children ( options . target ) ;
143
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
144
155
$$ . fragment && $$ . fragment . l ( nodes ) ;
145
156
nodes . forEach ( detach ) ;
146
157
} else {
You can’t perform that action at this time.
0 commit comments