From 1da2bd0daf5e8d9d4d83b393a12475d86e3cbf69 Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Wed, 10 Oct 2018 20:07:13 +0100 Subject: [PATCH] Initial commit --- types/d3-graphviz/d3-graphviz-tests.ts | 0 types/d3-graphviz/index.d.ts | 39 ++++++++++++++++++++++++++ types/d3-graphviz/tsconfig.json | 22 +++++++++++++++ types/d3-graphviz/tslint.json | 1 + 4 files changed, 62 insertions(+) create mode 100644 types/d3-graphviz/d3-graphviz-tests.ts create mode 100644 types/d3-graphviz/index.d.ts create mode 100644 types/d3-graphviz/tsconfig.json create mode 100644 types/d3-graphviz/tslint.json diff --git a/types/d3-graphviz/d3-graphviz-tests.ts b/types/d3-graphviz/d3-graphviz-tests.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts new file mode 100644 index 0000000000..8dc81e1f1c --- /dev/null +++ b/types/d3-graphviz/index.d.ts @@ -0,0 +1,39 @@ +// Type definitions for d3-graphviz 2.6 +// Project: https://github.com/magjac/d3-graphviz +// Definitions by: Dom Parfitt +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/*~ If this module is a UMD module that exposes a global variable 'myLib' when + *~ loaded outside a module loader environment, declare that global here. + *~ Otherwise, delete this declaration. + */ +export as namespace myLib; + +/*~ If this module has methods, declare them as functions like so. + */ +export function myMethod(a: string): string; +export function myOtherMethod(a: number): number; + +/*~ You can declare types that are available via importing the module */ +export interface someType { + name: string; + length: number; + extras?: string[]; +} + +/*~ You can declare properties of the module using const, let, or var */ +export const myField: number; + +/*~ If there are types, properties, or methods inside dotted names + *~ of the module, declare them inside a 'namespace'. + */ +export namespace subProp { + /*~ For example, given this definition, someone could write: + *~ import { subProp } from 'yourModule'; + *~ subProp.foo(); + *~ or + *~ import * as yourMod from 'yourModule'; + *~ yourMod.subProp.foo(); + */ + export function foo(): void; +} \ No newline at end of file diff --git a/types/d3-graphviz/tsconfig.json b/types/d3-graphviz/tsconfig.json new file mode 100644 index 0000000000..42e41a7b1f --- /dev/null +++ b/types/d3-graphviz/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "d3-graphviz-tests.ts" + ] +} diff --git a/types/d3-graphviz/tslint.json b/types/d3-graphviz/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/d3-graphviz/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }