Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions apps/svelte.dev/content/docs/svelte/98-reference/20-svelte.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ The first time the callback runs will be after the initial `onMount`.

In runes mode use `$effect` instead.

https://svelte.dev/docs/svelte#afterupdate

<div class="ts-block">

```ts
Expand All @@ -53,8 +51,6 @@ The first time the callback runs will be before the initial `onMount`.

In runes mode use `$effect.pre` instead.

https://svelte.dev/docs/svelte#beforeupdate

<div class="ts-block">

```ts
Expand Down Expand Up @@ -84,8 +80,6 @@ const dispatch = createEventDispatcher<{
}>();
```

https://svelte.dev/docs/svelte#createeventdispatcher

<div class="ts-block">

```ts
Expand Down Expand Up @@ -134,8 +128,6 @@ Retrieves the whole context map that belongs to the closest parent component.
Must be called during component initialisation. Useful, for example, if you
programmatically create a component and want to pass the existing context to it.

https://svelte.dev/docs/svelte#getallcontexts

<div class="ts-block">

```ts
Expand All @@ -152,8 +144,6 @@ function getAllContexts<
Retrieves the context that belongs to the closest parent component with the specified `key`.
Must be called during component initialisation.

https://svelte.dev/docs/svelte#getcontext

<div class="ts-block">

```ts
Expand All @@ -168,8 +158,6 @@ function getContext<T>(key: any): T;
Checks whether a given `key` has been set in the context of a parent component.
Must be called during component initialisation.

https://svelte.dev/docs/svelte#hascontext

<div class="ts-block">

```ts
Expand Down Expand Up @@ -261,8 +249,6 @@ Schedules a callback to run immediately before the component is unmounted.
Out of `onMount`, `beforeUpdate`, `afterUpdate` and `onDestroy`, this is the
only one that runs inside a server-side component.

https://svelte.dev/docs/svelte#ondestroy

<div class="ts-block">

```ts
Expand All @@ -282,8 +268,6 @@ If a function is returned _synchronously_ from `onMount`, it will be called when

`onMount` does not run inside a [server-side component](https://svelte.dev/docs#run-time-server-side-component-api).

https://svelte.dev/docs/svelte#onmount

<div class="ts-block">

```ts
Expand All @@ -306,8 +290,6 @@ and returns that object. The context is then available to children of the compon

Like lifecycle functions, this must be called during component initialisation.

https://svelte.dev/docs/svelte#setcontext

<div class="ts-block">

```ts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ export const myAction: Action<HTMLDivElement, { someProperty: boolean } | undefi
You can return an object with methods `update` and `destroy` from the function and type which additional attributes and events it has.
See interface `ActionReturn` for more details.

Docs: https://svelte.dev/docs/svelte-action

<div class="ts-block">

```dts
Expand Down Expand Up @@ -74,8 +72,6 @@ export function myAction(node: HTMLElement, parameter: Parameter): ActionReturn<
}
```

Docs: https://svelte.dev/docs/svelte-action

<div class="ts-block">

```dts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import { flip } from 'svelte/animate';
The flip function calculates the start and end position of an element and animates between them, translating the x and y values.
`flip` stands for [First, Last, Invert, Play](https://aerotwist.com/blog/flip-your-animations/).

https://svelte.dev/docs/svelte-animate#flip

<div class="ts-block">

```ts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ const VERSION: string;

`compile` converts your `.svelte` source code into a JavaScript module that exports a component

https://svelte.dev/docs/svelte-compiler#svelte-compile

<div class="ts-block">

```ts
Expand All @@ -54,8 +52,6 @@ function compile(

`compileModule` takes your JavaScript source code containing runes, and turns it into a JavaScript module.

https://svelte.dev/docs/svelte-compiler#svelte-compile

<div class="ts-block">

```ts
Expand Down Expand Up @@ -91,8 +87,6 @@ The parse function parses a component, returning only its abstract syntax tree.
The `modern` option (`false` by default in Svelte 5) makes the parser return a modern AST instead of the legacy AST.
`modern` will become `true` by default in Svelte 6, and the option will be removed in Svelte 7.

https://svelte.dev/docs/svelte-compiler#svelte-parse

<div class="ts-block">

```ts
Expand All @@ -115,8 +109,6 @@ The parse function parses a component, returning only its abstract syntax tree.
The `modern` option (`false` by default in Svelte 5) makes the parser return a modern AST instead of the legacy AST.
`modern` will become `true` by default in Svelte 6, and the option will be removed in Svelte 7.

https://svelte.dev/docs/svelte-compiler#svelte-parse

<div class="ts-block">

```ts
Expand All @@ -139,8 +131,6 @@ function parse(
The preprocess function provides convenient hooks for arbitrarily transforming component source code.
For example, it can be used to convert a <style lang="sass"> block into vanilla CSS.

https://svelte.dev/docs/svelte-compiler#svelte-preprocess

<div class="ts-block">

```ts
Expand Down
Loading
Loading