Skip to content

Commit f4d82d0

Browse files
committed
tidy up
1 parent a014a79 commit f4d82d0

File tree

14 files changed

+231
-122
lines changed

14 files changed

+231
-122
lines changed

apps/svelte.dev/content/docs/svelte/04-runtime/03-lifecycle-hooks.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ function onDestroy(fn: () => any): void;
5353

5454
</div>
5555

56+
57+
5658
Schedules a callback to run immediately before the component is unmounted.
5759

5860
Out of `onMount`, `beforeUpdate`, `afterUpdate` and `onDestroy`, this is the only one that runs inside a server-side component.

apps/svelte.dev/content/docs/svelte/98-reference/20-svelte.md

Lines changed: 37 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ function afterUpdate(fn: () => void): void;
4242

4343
</div>
4444

45+
46+
4547
## beforeUpdate
4648

4749
Schedules a callback to run immediately before the component is updated after any state change.
@@ -58,6 +60,8 @@ function beforeUpdate(fn: () => void): void;
5860

5961
</div>
6062

63+
64+
6165
## createEventDispatcher
6266

6367
Creates an event dispatcher that can be used to dispatch [component events](https://svelte.dev/docs#template-syntax-component-directives-on-eventname).
@@ -88,6 +92,8 @@ function createEventDispatcher<
8892

8993
</div>
9094

95+
96+
9197
## createRawSnippet
9298

9399
Create a snippet programmatically
@@ -105,6 +111,8 @@ function createRawSnippet<Params extends unknown[]>(
105111

106112
</div>
107113

114+
115+
108116
## flushSync
109117

110118
Synchronously flushes any pending state changes and those that result from it.
@@ -117,6 +125,8 @@ function flushSync(fn?: (() => void) | undefined): void;
117125

118126
</div>
119127

128+
129+
120130
## getAllContexts
121131

122132
Retrieves the whole context map that belongs to the closest parent component.
@@ -133,6 +143,8 @@ function getAllContexts<
133143

134144
</div>
135145

146+
147+
136148
## getContext
137149

138150
Retrieves the context that belongs to the closest parent component with the specified `key`.
@@ -146,6 +158,8 @@ function getContext<T>(key: any): T;
146158

147159
</div>
148160

161+
162+
149163
## hasContext
150164

151165
Checks whether a given `key` has been set in the context of a parent component.
@@ -159,6 +173,8 @@ function hasContext(key: any): boolean;
159173

160174
</div>
161175

176+
177+
162178
## hydrate
163179

164180
Hydrates a component on the given target and returns the exports and potentially the props (if compiled with `accessors: true`) of the component
@@ -195,6 +211,8 @@ function hydrate<
195211

196212
</div>
197213

214+
215+
198216
## mount
199217

200218
Mounts a component to the given target and returns the exports and potentially the props (if compiled with `accessors: true`) of the component.
@@ -232,6 +250,8 @@ function mount<
232250

233251
</div>
234252

253+
254+
235255
## onDestroy
236256

237257
Schedules a callback to run immediately before the component is unmounted.
@@ -247,6 +267,8 @@ function onDestroy(fn: () => any): void;
247267

248268
</div>
249269

270+
271+
250272
## onMount
251273

252274
The `onMount` function schedules a callback to run as soon as the component has been mounted to the DOM.
@@ -270,6 +292,8 @@ function onMount<T>(
270292

271293
</div>
272294

295+
296+
273297
## setContext
274298

275299
Associates an arbitrary `context` object with the current component and the specified `key`
@@ -286,6 +310,8 @@ function setContext<T>(key: any, context: T): T;
286310

287311
</div>
288312

313+
314+
289315
## tick
290316

291317
Returns a promise that resolves once any pending state changes have been applied.
@@ -298,6 +324,8 @@ function tick(): Promise<void>;
298324

299325
</div>
300326

327+
328+
301329
## unmount
302330

303331
Unmounts a component that was previously mounted using `mount` or `hydrate`.
@@ -310,6 +338,8 @@ function unmount(component: Record<string, any>): void;
310338

311339
</div>
312340

341+
342+
313343
## untrack
314344

315345
Use `untrack` to prevent something from being treated as an `$effect`/`$derived` dependency.
@@ -324,6 +354,8 @@ function untrack<T>(fn: () => T): T;
324354

325355
</div>
326356

357+
358+
327359
## Component
328360

329361
Can be used to create strongly typed Svelte components.
@@ -403,8 +435,7 @@ element?: typeof HTMLElement;
403435
The custom element version of the component. Only present if compiled with the `customElement` compiler option
404436

405437
</div>
406-
</div>
407-
</div>
438+
</div></div>
408439

409440
## ComponentConstructorOptions
410441

@@ -504,8 +535,7 @@ $$inline?: boolean;
504535
```
505536

506537
<div class="ts-block-property-details"></div>
507-
</div>
508-
</div>
538+
</div></div>
509539

510540
## ComponentEvents
511541

@@ -524,7 +554,6 @@ type ComponentEvents<Comp extends SvelteComponent> =
524554
: never;
525555
```
526556

527-
528557
</div>
529558

530559
## ComponentInternals
@@ -537,7 +566,6 @@ Internal implementation details that vary between environments
537566
type ComponentInternals = Branded<{}, 'ComponentInternals'>;
538567
```
539568

540-
541569
</div>
542570

543571
## ComponentProps
@@ -582,7 +610,6 @@ type ComponentProps<
582610
: never;
583611
```
584612

585-
586613
</div>
587614

588615
## ComponentType
@@ -610,7 +637,6 @@ type ComponentType<
610637
};
611638
```
612639

613-
614640
</div>
615641

616642
## EventDispatcher
@@ -636,8 +662,7 @@ interface EventDispatcher<
636662
```
637663

638664
<div class="ts-block-property-details"></div>
639-
</div>
640-
</div>
665+
</div></div>
641666

642667
## Snippet
643668

@@ -670,8 +695,7 @@ interface Snippet<Parameters extends unknown[] = []> {/*…*/}
670695
```
671696

672697
<div class="ts-block-property-details"></div>
673-
</div>
674-
</div>
698+
</div></div>
675699

676700
## SvelteComponent
677701

@@ -789,8 +813,7 @@ for more info.
789813
</div>
790814

791815
</div>
792-
</div>
793-
</div>
816+
</div></div>
794817

795818
## SvelteComponentTyped
796819

@@ -810,7 +833,6 @@ class SvelteComponentTyped<
810833
> extends SvelteComponent<Props, Events, Slots> {}
811834
```
812835

813-
814836
</div>
815837

816838

apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-action.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ interface Action<
4242
```
4343

4444
<div class="ts-block-property-details"></div>
45-
</div>
46-
</div>
45+
</div></div>
4746

4847
## ActionReturn
4948

@@ -100,7 +99,6 @@ destroy?: () => void;
10099
```
101100

102101
<div class="ts-block-property-details"></div>
103-
</div>
104-
</div>
102+
</div></div>
105103

106104

apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-animate.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ function flip(
3232

3333
</div>
3434

35+
36+
3537
## AnimationConfig
3638

3739
<div class="ts-block">
@@ -83,8 +85,7 @@ tick?: (t: number, u: number) => void;
8385
```
8486

8587
<div class="ts-block-property-details"></div>
86-
</div>
87-
</div>
88+
</div></div>
8889

8990
## FlipParams
9091

@@ -119,7 +120,6 @@ easing?: (t: number) => number;
119120
```
120121

121122
<div class="ts-block-property-details"></div>
122-
</div>
123-
</div>
123+
</div></div>
124124

125125

0 commit comments

Comments
 (0)