@ortoo/angular-resource
Version:
Magical CRUD resource management for angular
37 lines (36 loc) • 1.79 kB
TypeScript
import { SubscribableOrPromise } from 'rxjs/Observable';
import { Subject } from 'rxjs/Subject';
import { Subscriber } from 'rxjs/Subscriber';
import { Subscription } from 'rxjs/Subscription';
import { Deferred as IDeferred, JSONPatch, LocalForage } from './types';
export declare function convertJsonDates(jsonData: any): {};
export declare function toJSON(obj: any): any;
export declare function diff(obj1: any, obj2: any): any;
export declare function applyPatch(res: any, patch: JSONPatch): void;
export declare function mergeObjects(mine: any, old: any, yours: any): {};
export declare function forEachVal(res: any, cb: Function): void;
export declare function toJsonReplacer(key: any, value: any): any;
export declare function fromJsonReviver(_: any, value: any): any;
export declare function toObject(res: any): any;
export declare function removeResValues(res: any): void;
export declare function setResValues(res: any, vals: any): void;
export declare function persistentStorageKey(url: string): string;
export declare function advancedStorage(localForage: LocalForage): boolean;
export declare function uuid(): string;
export declare class Deferred<T> implements IDeferred<T> {
promise: Promise<T>;
resolve: (val?: T) => void;
reject: (err: Error) => void;
constructor();
}
export declare function isSubscribableOrPromise<T>(value: any): value is SubscribableOrPromise<T>;
export declare class ResolvedSubject<T> extends Subject<T> {
private _value;
private _resolved;
constructor(promise: Promise<T>);
readonly value: T;
getValue(): T;
next(value: T): void;
protected _subscribe(subscriber: Subscriber<T>): Subscription;
}
export declare function convertToResolvedSubject<T>(subject: Subject<T>, promise: Promise<T>): ResolvedSubject<T>;