From f50219a55eb7ee18eda6ce88fe8709cf36632101 Mon Sep 17 00:00:00 2001 From: Ivan Hofer Date: Wed, 22 Feb 2023 19:36:17 +0100 Subject: [PATCH] revert formatting changes --- src/runtime/internal/lifecycle.ts | 66 +++++++++++++++---------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/src/runtime/internal/lifecycle.ts b/src/runtime/internal/lifecycle.ts index 4b0252d266..fd03779fa8 100644 --- a/src/runtime/internal/lifecycle.ts +++ b/src/runtime/internal/lifecycle.ts @@ -13,9 +13,9 @@ export function get_current_component() { /** * Schedules a callback to run immediately before the component is updated after any state change. - * + * * The first time the callback runs will be before the initial `onMount` - * + * * https://svelte.dev/docs#run-time-svelte-beforeupdate */ export function beforeUpdate(fn: () => any) { @@ -23,12 +23,12 @@ export function beforeUpdate(fn: () => any) { } /** - * The `onMount` function schedules a callback to run as soon as the component has been mounted to the DOM. - * It must be called during the component's initialisation (but doesn't need to live *inside* the component; + * The `onMount` function schedules a callback to run as soon as the component has been mounted to the DOM. + * It must be called during the component's initialisation (but doesn't need to live *inside* the component; * it can be called from an external module). - * + * * `onMount` does not run inside a [server-side component](/docs#run-time-server-side-component-api). - * + * * https://svelte.dev/docs#run-time-svelte-onmount */ export function onMount(fn: () => any) { @@ -37,19 +37,19 @@ export function onMount(fn: () => any) { /** * Schedules a callback to run immediately after the component has been updated. - * - * The first time the callback runs will be after the initial `onMount` + * + * The first time the callback runs will be after the initial `onMount` */ export function afterUpdate(fn: () => any) { get_current_component().$$.after_update.push(fn); } -/** +/** * Schedules a callback to run immediately before the component is unmounted. - * - * Out of `onMount`, `beforeUpdate`, `afterUpdate` and `onDestroy`, this is the + * + * Out of `onMount`, `beforeUpdate`, `afterUpdate` and `onDestroy`, this is the * only one that runs inside a server-side component. - * + * * https://svelte.dev/docs#run-time-svelte-ondestroy */ export function onDestroy(fn: () => any) { @@ -80,15 +80,15 @@ export interface DispatchOptions { } /** - * Creates an event dispatcher that can be used to dispatch [component events](/docs#template-syntax-component-directives-on-eventname). + * Creates an event dispatcher that can be used to dispatch [component events](/docs#template-syntax-component-directives-on-eventname). * Event dispatchers are functions that can take two arguments: `name` and `detail`. - * - * Component events created with `createEventDispatcher` create a - * [CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent). + * + * Component events created with `createEventDispatcher` create a + * [CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent). * These events do not [bubble](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Events#Event_bubbling_and_capture). - * The `detail` argument corresponds to the [CustomEvent.detail](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/detail) - * property and can contain any type of data. - * + * The `detail` argument corresponds to the [CustomEvent.detail](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/detail) + * property and can contain any type of data. + * * https://svelte.dev/docs#run-time-svelte-createeventdispatcher */ export function createEventDispatcher< @@ -114,12 +114,12 @@ export function createEventDispatcher< } /** - * Associates an arbitrary `context` object with the current component and the specified `key` - * and returns that object. The context is then available to children of the component + * Associates an arbitrary `context` object with the current component and the specified `key` + * and returns that object. The context is then available to children of the component * (including slotted content) with `getContext`. - * - * Like lifecycle functions, this must be called during component initialisation. - * + * + * Like lifecycle functions, this must be called during component initialisation. + * * https://svelte.dev/docs#run-time-svelte-setcontext */ export function setContext(key, context: T): T { @@ -128,9 +128,9 @@ export function setContext(key, context: T): T { } /** - * Retrieves the context that belongs to the closest parent component with the specified `key`. - * Must be called during component initialisation. - * + * Retrieves the context that belongs to the closest parent component with the specified `key`. + * Must be called during component initialisation. + * * https://svelte.dev/docs#run-time-svelte-getcontext */ export function getContext(key): T { @@ -138,10 +138,10 @@ export function getContext(key): T { } /** - * Retrieves the whole context map that belongs to the closest parent component. - * Must be called during component initialisation. Useful, for example, if you + * 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#run-time-svelte-getallcontexts */ export function getAllContexts = Map>(): T { @@ -149,9 +149,9 @@ export function getAllContexts = Map>(): T { } /** - * Checks whether a given `key` has been set in the context of a parent component. - * Must be called during component initialisation. - * + * 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#run-time-svelte-hascontext */ export function hasContext(key): boolean {