diff --git a/types/blockies/blockies-tests.ts b/types/blockies/blockies-tests.ts new file mode 100644 index 0000000000..31b9dcad48 --- /dev/null +++ b/types/blockies/blockies-tests.ts @@ -0,0 +1,4 @@ +import blockies = require('blockies'); + +const seed = 'seed'; +blockies({ seed }); diff --git a/types/blockies/index.d.ts b/types/blockies/index.d.ts new file mode 100644 index 0000000000..f2de8b2c53 --- /dev/null +++ b/types/blockies/index.d.ts @@ -0,0 +1,14 @@ +// Type definitions for blockies 0.0 +// Project: https://github.com/goldylucks/blockies-npm +// Definitions by: Leonid Logvinov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +interface BlockiesIcon { + toDataURL(): string; +} +interface BlockiesConfig { + seed: string; +} +declare function blockies(config: BlockiesConfig): BlockiesIcon; + +export = blockies; diff --git a/types/blockies/tsconfig.json b/types/blockies/tsconfig.json new file mode 100644 index 0000000000..f190f0b0c9 --- /dev/null +++ b/types/blockies/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "blockies-tests.ts"] +} diff --git a/types/blockies/tslint.json b/types/blockies/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/blockies/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }