@shined/reactive
Version:
⚛️ Proxy-driven state library for JavaScript application, Intuitive, Flexible and Written in TypeScript.
25 lines (23 loc) • 1.36 kB
text/typescript
type ExpandType<T> = {
[K in keyof T]: T[K];
};
type DeepExpandType<T> = {
[K in keyof T]: T[K] extends object ? DeepExpandType<T[K]> : T[K];
};
type AnyFunc = (...args: any[]) => any;
declare const SNAPSHOT: unique symbol;
declare const LISTENERS: unique symbol;
declare const REACTIVE: unique symbol;
declare const isProduction: boolean;
declare const noop: () => void;
declare const hasOwn: (v: PropertyKey) => boolean;
declare const isObject: (x: unknown) => x is object;
declare const isBoolean: (x: unknown) => x is boolean;
declare const isFunction: (x: unknown) => x is (...args: any[]) => any;
declare function createObjectFromPrototype<T extends object>(target: T): T;
declare function canProxy(x: unknown): boolean;
declare function propertyKeysToPath(keys: PropertyKey[]): string;
declare function get(object: object, path: PropertyKey | PropertyKey[], defaultValue?: unknown): unknown;
declare function shallowEqual<T>(objA: T, objB: T): boolean;
declare function deepEqual<T>(objA: T, objB: T): boolean;
export { type AnyFunc as A, type DeepExpandType as D, type ExpandType as E, LISTENERS as L, REACTIVE as R, SNAPSHOT as S, isObject as a, isBoolean as b, isFunction as c, createObjectFromPrototype as d, canProxy as e, deepEqual as f, get as g, hasOwn as h, isProduction as i, noop as n, propertyKeysToPath as p, shallowEqual as s };