@antv/g2
Version:
the Grammar of Graphics in Javascript
13 lines (10 loc) • 325 B
text/typescript
import { stdlib } from '../lib/std';
import { G2ComponentNamespaces, G2Component } from '../runtime';
export const library = stdlib();
// @todo Warn if override existing key.
export function register(
key: `${G2ComponentNamespaces}.${any}`,
component: G2Component,
) {
Object.assign(library, { [key]: component });
}