mirror of
https://github.com/owncast/owncast.git
synced 2024-10-10 19:16:02 +00:00
Commit updated Javascript packages
This commit is contained in:
57
build/javascript/node_modules/preact/hooks/src/internal.d.ts
generated
vendored
Normal file
57
build/javascript/node_modules/preact/hooks/src/internal.d.ts
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
import { Component as PreactComponent } from '../../src/internal';
|
||||
import { Reducer } from '.';
|
||||
|
||||
export { PreactContext } from '../../src/internal';
|
||||
|
||||
/**
|
||||
* The type of arguments passed to a Hook function. While this type is not
|
||||
* strictly necessary, they are given a type name to make it easier to read
|
||||
* the following types and trace the flow of data.
|
||||
*/
|
||||
export type HookArgs = any;
|
||||
|
||||
/**
|
||||
* The return type of a Hook function. While this type is not
|
||||
* strictly necessary, they are given a type name to make it easier to read
|
||||
* the following types and trace the flow of data.
|
||||
*/
|
||||
export type HookReturnValue = any;
|
||||
|
||||
/** The public function a user invokes to use a Hook */
|
||||
export type Hook = (...args: HookArgs[]) => HookReturnValue;
|
||||
|
||||
// Hook tracking
|
||||
|
||||
export interface ComponentHooks {
|
||||
/** The list of hooks a component uses */
|
||||
_list: HookState[];
|
||||
/** List of Effects to be invoked after the next frame is rendered */
|
||||
_pendingEffects: EffectHookState[];
|
||||
}
|
||||
|
||||
export interface Component extends PreactComponent<any, any> {
|
||||
__hooks?: ComponentHooks;
|
||||
}
|
||||
|
||||
export type HookState = EffectHookState | MemoHookState | ReducerHookState;
|
||||
|
||||
export type Effect = () => void | Cleanup;
|
||||
export type Cleanup = () => void;
|
||||
|
||||
export interface EffectHookState {
|
||||
_value?: Effect;
|
||||
_args?: any[];
|
||||
_cleanup?: Cleanup;
|
||||
}
|
||||
|
||||
export interface MemoHookState {
|
||||
_value?: any;
|
||||
_args?: any[];
|
||||
_factory?: () => any;
|
||||
}
|
||||
|
||||
export interface ReducerHookState {
|
||||
_value?: any;
|
||||
_component?: Component;
|
||||
_reducer?: Reducer<any, any>;
|
||||
}
|
||||
Reference in New Issue
Block a user