1 | import { G2Spec } from '../spec';
|
2 | import { G2Library } from '../runtime';
|
3 | import { Runtime, RuntimeOptions } from './runtime';
|
4 | import { MarkOf, CompositionOf as Of } from './types';
|
5 | import { MarkNode } from './mark';
|
6 | import { CompositionNode } from './composition';
|
7 | type BuiltinComposition = {
|
8 | 'composition.mark': any;
|
9 | 'composition.view': any;
|
10 | };
|
11 | export type CompositionOf<Library> = Of<Library, (composite?: any) => CompositionAPI<Library>>;
|
12 | export type CompositionAPI<Library> = CompositionNode<CompositionOf<Library> & MarkOf<Library, (composite?: any) => MarkNode>> & MarkOf<Library, (composite?: any) => MarkNode> & CompositionOf<Library>;
|
13 | export type API<Spec, Library> = Runtime<Spec> & MarkOf<Library, (composite?: any) => MarkNode> & CompositionOf<Library & BuiltinComposition>;
|
14 | export declare function extend<Spec extends G2Spec = G2Spec, Library extends G2Library = G2Library>(Runtime: new (options: RuntimeOptions) => Runtime<Spec>, library: Library): new (options?: RuntimeOptions) => API<Spec, Library>;
|
15 | export {};
|