Pinned Loading
-
Typescript Types and Utilities ✨
Typescript Types and Utilities ✨ 1export type NonEmptyArray<T> = readonly [T, ...Array<T>];
23export type TwoOrMore<T> = readonly [T, ...NonEmptyArray<T>];
45export type UnaryFn<I, O> = (value: I) => O;
-
-
Jest interface mock
Jest interface mock 1export type UnknownFunction = (...args: any[]) => any;
23export type MockedInterface<T extends object> = {
4[K in keyof T]: T[K] extends UnknownFunction ? jest.Mock : never;
5};
-
Observer pattern example
Observer pattern example 12type SubscriptionFunction<T> = (value: T) => (Promise<void> | void);
34type Observer<T> = {
5subscribe: (subscriptionFunction: SubscriptionFunction<T>) => void;
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.