UNPKG

1.17 kBTypeScriptView Raw
1import { IDisposable } from '@stoplight/lifecycle';
2import { Resolver } from '@stoplight/json-ref-resolver';
3import { IdGenerator, IGraph } from './graph';
4import { INotifier } from './notifier';
5import { IScheduler } from './scheduler';
6import { IGraphite, IGraphitePlugin } from './types';
7export interface IGraphiteProps {
8 id?: string;
9 graph?: IGraph;
10 notifier?: INotifier;
11 scheduler?: IScheduler;
12 idGenerator?: IdGenerator;
13 isMirror?: boolean;
14 resolveEagerly?: boolean;
15}
16export declare function createGraphite(props?: IGraphiteProps): Graphite;
17declare class Graphite implements IGraphite {
18 readonly id: string;
19 readonly graph: IGraph;
20 readonly notifier: INotifier;
21 readonly scheduler: IScheduler;
22 readonly resolver: Resolver;
23 private _disposables;
24 constructor(props: IGraphiteProps);
25 registerPlugins(...plugins: IGraphitePlugin[]): IDisposable;
26 dispose: () => void;
27 private scheduleTransformations;
28 private scheduleDeserialize;
29 private scheduleSerialize;
30 private scheduleComputeSourceMap;
31 private scheduleResolveSourceNode;
32 private scheduleValidateSourceNode;
33}
34export {};