Merge namespaces

But keep both `export as` global names for backwards compatibility

This introduces the `vg` members onto the Vega namespace, which is incorrect, however it leaves existing code which depends on this dts as functional while making allowing module consumers to have all Vega types available.
This commit is contained in:
Wesley Wigham 2016-10-31 17:07:33 -04:00 committed by GitHub
parent 6b867a59e3
commit 9b1ab64b39

10
vega/index.d.ts vendored
View File

@ -3,7 +3,7 @@
// Definitions by: Tom Crockett <http://github.com/pelotom>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace Vega {
declare namespace vg {
export type ChartViewConstructor = {
(args: {renderer: 'svg'} & ViewArgs): SvgView;
@ -525,15 +525,13 @@ declare namespace Vega {
offset?: number;
band?: boolean;
}
}
declare namespace vg {
export var parse: Vega.Parse;
export var parse: Parse;
export namespace scene {
export function item(mark: Vega.Node): Vega.Node;
export function item(mark: Node): Node;
}
export class Bounds implements Vega.Bounds {
export class Bounds implements Bounds {
x1: number;
y1: number;
x2: number;