### TimerHandle Type Alias Source: https://fkcaikengren.github.io/uni-hooks/hooks/shared/type-aliases/TimerHandle Defines a universal timer handle type that is compatible with both browser and Node.js environments for setTimeout. ```APIDOC ## Type Alias: TimerHandle ### Description Represents a universal timer handle that works in both browser and Node.js environments. It is defined as the return type of `setTimeout` or `undefined`. ### Defined in `packages/uni-hooks-shared/src/types.ts:109` ### Type Definition ```typescript `ReturnType`<_typeof_ `setTimeout`> | `undefined` ``` ``` -------------------------------- ### Default Initial State for PausableFilterOptions - TypeScript Source: https://fkcaikengren.github.io/uni-hooks/hooks/shared/interfaces/PausableFilterOptions Specifies the default value for the initialState property within the PausableFilterOptions interface. The default state is 'active'. ```typescript const defaultOptions: PausableFilterOptions = { initialState: 'active' }; ``` -------------------------------- ### ThrottleFilterOptions Interface Definition (TypeScript) Source: https://fkcaikengren.github.io/uni-hooks/hooks/shared/interfaces/ThrottleFilterOptions Defines the structure for options used to configure throttling behavior. It includes properties for delay, leading edge invocation, trailing edge invocation, and rejection on cancellation. ```typescript interface ThrottleFilterOptions { delay: MaybeRefOrGetter; leading?: boolean; trailing?: boolean; rejectOnCancel?: boolean; } ``` -------------------------------- ### Define AnyFn Type Alias (TypeScript) Source: https://fkcaikengren.github.io/uni-hooks/hooks/shared/type-aliases/AnyFn This snippet defines the `AnyFn` type alias in TypeScript. It represents a function that can accept any arguments and return any value. This is useful for creating flexible function types within the uni-hooks library. ```typescript type AnyFn = (...args: any[]) => any; ``` -------------------------------- ### Define Universal TimerHandle Type (TypeScript) Source: https://fkcaikengren.github.io/uni-hooks/hooks/shared/type-aliases/TimerHandle This TypeScript code defines the TimerHandle type alias. It is designed to be a universal timer handle that works across different JavaScript environments, including browsers and Node.js. The type is derived from the return type of setTimeout and can also be undefined. ```typescript export type TimerHandle = ReturnType | undefined; ``` -------------------------------- ### PausableFilterOptions Interface Properties - TypeScript Source: https://fkcaikengren.github.io/uni-hooks/hooks/shared/interfaces/PausableFilterOptions Defines the properties for the PausableFilterOptions interface, including the optional initialState which can be 'active' or 'paused'. The default value for initialState is 'active'. ```typescript interface PausableFilterOptions { initialState?: 'active' | 'paused'; } ``` -------------------------------- ### Define UseListService Type Alias (TypeScript) Source: https://fkcaikengren.github.io/uni-hooks/hooks/hooks/type-aliases/UseListService Defines the UseListService type alias, which represents a function that fetches data. It is a generic type that extends UseListData and returns a Promise of TData. It accepts an optional currentData parameter of type TData. ```typescript type UseListService = (currentData?: TData) => Promise; ``` -------------------------------- ### Define Arrayable Type Alias Source: https://fkcaikengren.github.io/uni-hooks/hooks/shared/type-aliases/Arrayable Defines a generic type alias 'Arrayable' which represents either a single value of type T or an array of T. This is useful for functions that can accept both single values and arrays for convenience. It is defined in the 'uni-hooks-shared' package. ```typescript type Arrayable = T[] | T; ``` -------------------------------- ### Define VoidFn Type Alias (TypeScript) Source: https://fkcaikengren.github.io/uni-hooks/hooks/shared/type-aliases/VoidFn Defines a type alias named VoidFn representing a function that accepts no arguments and returns void. This is a common pattern for defining function signatures that do not produce a return value. ```typescript type VoidFn = () => void; ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.