@difizen/mana-observable
Version:
31 lines • 1.86 kB
TypeScript
import 'reflect-metadata';
import type { Disposable } from '@difizen/mana-common';
import type { Traceable } from './core';
export declare namespace Observability {
function isTraceable(data: any): data is Traceable;
function isObject(obj: any): obj is Record<string | number | symbol, any>;
function canBeObservable(obj: any): obj is Record<string | number | symbol, any>;
function marked(obj: any, property?: string | symbol): boolean;
function mark(obj: Record<any, any>, property?: string | symbol): void;
function defineOrigin(obj: Record<any, any>, property: string | symbol): void;
function shouldKeepOrigin(obj: any, property: string | symbol): boolean;
function getOrigin<T = any>(obj: T): T;
function equals(a: any, b: any): boolean;
function getDisposable(metaKey: any, obj: Record<string, any>, property?: string): any;
function setDisposable(metaKey: any, disposable: Disposable, obj: Record<string, any>, property?: string): void;
}
export declare namespace ObservableProperties {
function getOwn(obj: Record<string, any>): string[] | undefined;
function get(obj: Record<string, any>): string[] | undefined;
function find(obj: Record<string, any>): string[] | undefined;
function add(obj: Record<any, any>, property: string): void;
}
export declare namespace InstanceValue {
function set(target: any, property: string, value: any): void;
function get(target: any, property: string): any;
}
export type DesignType = undefined | typeof Function | typeof String | typeof Boolean | typeof Number | typeof Array | typeof Map | typeof Object;
export declare const getOrigin: typeof Observability.getOrigin;
export declare const equals: typeof Observability.equals;
export declare function isReadonly(target: object, property: string | symbol): boolean;
//# sourceMappingURL=utils.d.ts.map