vega-typings
Advanced tools
Comparing version 0.1.0 to 0.2.0
{ | ||
"name": "vega-typings", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "Typings for Vega", | ||
@@ -13,4 +13,3 @@ "types": "types", | ||
"scripts": { | ||
"format": | ||
"prettier $([ \"$CI\" == true ] && echo --list-different || echo --write) './**/*.{ts,tsx,js,json,css}'", | ||
"format": "prettier $([ \"$CI\" == true ] && echo --list-different || echo --write) './**/*.{ts,tsx,js,json,css}'", | ||
"test": "tsc" | ||
@@ -17,0 +16,0 @@ }, |
@@ -1,93 +0,2 @@ | ||
// TypeScript Version: 2.2 | ||
// ============================================================================================ | ||
// Spec typings adapted from https://github.com/vega/vega-parser/tree/as/typings | ||
// ============================================================================================ | ||
import { AutoSize } from './autosize'; | ||
import { Background } from './background'; | ||
import { Padding } from './padding'; | ||
import { Scope } from './scope'; | ||
import { EncodeEntry, Encode } from './encode'; | ||
export * from './autosize'; | ||
export * from './axis'; | ||
export * from './background'; | ||
export * from './bind'; | ||
export * from './data'; | ||
export * from './encode'; | ||
export * from './expr'; | ||
export * from './layout'; | ||
export * from './legend'; | ||
export * from './mark'; | ||
export * from './marktype'; | ||
export * from './on-events'; | ||
export * from './on-trigger'; | ||
export * from './padding'; | ||
export * from './projection'; | ||
export * from './scale'; | ||
export * from './scope'; | ||
export * from './selector'; | ||
export * from './signal'; | ||
export * from './stream'; | ||
export * from './title'; | ||
export * from './transform'; | ||
export interface Spec extends Scope, Encode<EncodeEntry> { | ||
$schema: string; | ||
width?: number; | ||
height?: number; | ||
config?: any; | ||
description?: string; | ||
padding?: Padding; | ||
autosize?: AutoSize; | ||
background?: Background; | ||
} | ||
// ============================================================================================ | ||
// Runtime typings adapted from https://github.com/vega/vega-lite/blob/master/typings/vega.d.ts | ||
// ============================================================================================ | ||
// TODO | ||
export type Runtime = any; | ||
export const version: string; | ||
export function parse(spec: any, opt?: any): Runtime; | ||
export function isString(value: any): value is string; | ||
export type Loader = { | ||
load: (uri: string, options?: any) => Promise<string>; | ||
sanitize: (uri: string, options: any) => Promise<{ href: string }>; | ||
http: (uri: string, options: any) => Promise<string>; | ||
file: (filename: string) => Promise<string>; | ||
}; | ||
export class View { | ||
constructor(runtime: Runtime, config?: any); | ||
public initialize(dom?: Element | string): View; | ||
public finalize(): void; | ||
public logLevel(level: number): View; | ||
public renderer(renderer: 'canvas' | 'svg' | 'none'): View; | ||
public loader(loader: Loader): View; | ||
public hover(): View; | ||
public run(): View; | ||
public change(name: string, changeset: any): View; | ||
public changeset(): any; | ||
public data(name: string): object[]; | ||
public width(w: number): View; | ||
public height(h: number): View; | ||
public padding( | ||
p: number | { left?: number; right?: number; top?: number; bottom?: number }, | ||
): View; | ||
public toImageURL(type: string): Promise<string>; | ||
toSVG(): Promise<string>; | ||
toCanvas(): Promise<any>; // TODO node-canvas result | ||
} | ||
export const Warn: number; | ||
export const changeset: any; | ||
export const loader: (opt?: any) => Loader; | ||
export * from './spec'; | ||
export * from './runtime'; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
271925
34
11309