From 9b7dbac1da30e5de416798c9f691d082c215171c Mon Sep 17 00:00:00 2001 From: Austaras Date: Thu, 14 Jun 2018 14:52:06 +0800 Subject: [PATCH 1/2] fix blockies --- types/blockies/index.d.ts | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/types/blockies/index.d.ts b/types/blockies/index.d.ts index f2de8b2c53..2a8cc526ad 100644 --- a/types/blockies/index.d.ts +++ b/types/blockies/index.d.ts @@ -3,12 +3,16 @@ // Definitions by: Leonid Logvinov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -interface BlockiesIcon { - toDataURL(): string; -} -interface BlockiesConfig { - seed: string; -} -declare function blockies(config: BlockiesConfig): BlockiesIcon; - +declare function blockies(config?: blockies.BlockiesConfig): HTMLCanvasElement; export = blockies; + +declare namespace blockies { + interface BlockiesConfig { + size?: number; + scale?: number; + seed?: string; + color?: string; + bgcolor?: string; + spotcolor?: string; + } +} From 1b6abc23c1aa1b92411c9338f2a0fdce10d06e28 Mon Sep 17 00:00:00 2001 From: Austaras Date: Thu, 14 Jun 2018 14:55:36 +0800 Subject: [PATCH 2/2] Update tsconfig.json --- types/blockies/tsconfig.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/types/blockies/tsconfig.json b/types/blockies/tsconfig.json index f190f0b0c9..db5851dcbb 100644 --- a/types/blockies/tsconfig.json +++ b/types/blockies/tsconfig.json @@ -1,7 +1,10 @@ { "compilerOptions": { "module": "commonjs", - "lib": ["es6"], + "lib": [ + "es6", + "dom" + ], "noImplicitAny": true, "noImplicitThis": true, "strictFunctionTypes": true,