diff options
author | Christoph Cullmann <christoph@cullmann.io> | 2024-07-15 22:27:55 +0200 |
---|---|---|
committer | Christoph Cullmann <christoph@cullmann.io> | 2024-07-15 22:27:55 +0200 |
commit | 3be5285488090ab70254b3080e33e64e6c702d2c (patch) | |
tree | 1e54462f560fd759b5be13d5ecfe1fa5c2c832ed /themes/blowfish/assets/lib/mermaid/utils/imperativeState.d.ts | |
parent | 69075c6fb15ae660fc3d78eb2a4dfcde1c5fba1c (diff) |
sync theme
Diffstat (limited to 'themes/blowfish/assets/lib/mermaid/utils/imperativeState.d.ts')
-rw-r--r-- | themes/blowfish/assets/lib/mermaid/utils/imperativeState.d.ts | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/themes/blowfish/assets/lib/mermaid/utils/imperativeState.d.ts b/themes/blowfish/assets/lib/mermaid/utils/imperativeState.d.ts deleted file mode 100644 index aa0de7e..0000000 --- a/themes/blowfish/assets/lib/mermaid/utils/imperativeState.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Resettable state storage. - * @example - * ``` - * const state = new ImperativeState(() => { - * foo: undefined as string | undefined, - * bar: [] as number[], - * baz: 1 as number | undefined, - * }); - * - * state.records.foo = "hi"; - * console.log(state.records.foo); // prints "hi"; - * state.reset(); - * console.log(state.records.foo); // prints "default"; - * - * // typeof state.records: - * // { - * // foo: string | undefined, // actual: undefined - * // bar: number[], // actual: [] - * // baz: number | undefined, // actual: 1 - * // } - * ``` - */ -export declare class ImperativeState<S extends Record<string, unknown>> { - private init; - records: S; - /** - * @param init - Function that creates the default state. - */ - constructor(init: () => S); - reset(): void; -} |