@difizen/mana-observable
Version:
24 lines • 798 B
TypeScript
import type { Abstract, Newable } from '@difizen/mana-common';
export declare namespace ObservableSymbol {
const Tracker: unique symbol;
const Notifier: unique symbol;
const Observable: unique symbol;
const ObservableProperties: unique symbol;
const KeepOrigin: unique symbol;
const Self: unique symbol;
}
export type Notify = (target?: any, prop?: any) => void;
export declare namespace Observable {
type Container = {
get: <T>(identifier: Token<T>) => T;
createChild: () => Container;
};
type Token<T> = string | symbol | Newable<T> | Abstract<T>;
type ContainerContext = {
getContainer: () => Container | undefined;
};
}
export interface Traceable<T = any> {
[ObservableSymbol.Self]: T;
}
//# sourceMappingURL=core.d.ts.map