Update src/runtime/action/index.ts

Co-authored-by: Ignatius Bagus <ignatius.mbs@gmail.com>
pull/7442/head
Tan Li Hau 4 years ago committed by GitHub
parent 34f7b95f5d
commit 99764b2cf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -17,14 +17,10 @@
*
* Docs: https://svelte.dev/docs#template-syntax-element-directives-use-action
*/
export type ActionReturn<Parameter = any> = void extends Parameter
? {
interface ActionReturn<Parameter = void> {
update?: void extends Parameter ? undefined : (parameter: Parameter) => void;
destroy?: () => void;
}
: {
update?: (parameter: Parameter) => void;
destroy?: () => void;
}
}
/**
* Actions are functions that are called when an element is created.

Loading…
Cancel
Save