From 1a23923aee303bec106f8db42a8c89683235c9bf Mon Sep 17 00:00:00 2001 From: Anton Lavrenov Date: Thu, 9 May 2019 08:28:09 -0500 Subject: [PATCH] typescript fixes --- .gitignore | 1 + CHANGELOG.md | 4 ++++ konva.js | 2 +- konva.min.js | 2 +- package.json | 2 +- src/Shape.ts | 5 +++-- tsconfig.json | 3 ++- 7 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 63b7372e..12098328 100644 --- a/.gitignore +++ b/.gitignore @@ -40,6 +40,7 @@ nbproject *.sublime-project *.sublime-workspace *.md.html +.vscode # Dreamweaver added files _notes diff --git a/CHANGELOG.md b/CHANGELOG.md index fea811f3..edd25605 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## Not released: +## [3.2.6][2019-05-09] + +* Typescript fixes again + ## [3.2.5][2019-04-17] * Show a warning when `Konva.Transformer` and attaching node have different parents. diff --git a/konva.js b/konva.js index fb7da70f..f88cf7bc 100644 --- a/konva.js +++ b/konva.js @@ -8,7 +8,7 @@ * Konva JavaScript Framework v3.2.5 * http://konvajs.org/ * Licensed under the MIT - * Date: Mon Apr 22 2019 + * Date: Thu May 09 2019 * * Original work Copyright (C) 2011 - 2013 by Eric Rowell (KineticJS) * Modified work Copyright (C) 2014 - present by Anton Lavrenov (Konva) diff --git a/konva.min.js b/konva.min.js index 8effcbee..1369ef71 100644 --- a/konva.min.js +++ b/konva.min.js @@ -3,7 +3,7 @@ * Konva JavaScript Framework v3.2.5 * http://konvajs.org/ * Licensed under the MIT - * Date: Mon Apr 22 2019 + * Date: Thu May 09 2019 * * Original work Copyright (C) 2011 - 2013 by Eric Rowell (KineticJS) * Modified work Copyright (C) 2014 - present by Anton Lavrenov (Konva) diff --git a/package.json b/package.json index 23ace1c1..aa4965b0 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "rollup-plugin-node-resolve": "^4.0.1", "rollup-plugin-sourcemaps": "^0.4.2", "rollup-plugin-typescript2": "^0.20.1", - "typescript": "^3.4.3" + "typescript": "^3.4.5" }, "keywords": [ "canvas", diff --git a/src/Shape.ts b/src/Shape.ts index 7143436e..14af3117 100644 --- a/src/Shape.ts +++ b/src/Shape.ts @@ -13,9 +13,10 @@ import { _registerNode } from './Global'; import { GetSet, Vector2d } from './types'; +// hack from here https://stackoverflow.com/questions/52667959/what-is-the-purpose-of-bivariancehack-in-typescript-types/52668133#52668133 export type ShapeConfigHandler = { - bivarianceHack(ctx: Context, shape: TTarget): void -}['bivarianceHack'] + bivarianceHack(ctx: Context, shape: TTarget): void; +}['bivarianceHack']; export interface ShapeConfig extends NodeConfig { fill?: string; diff --git a/tsconfig.json b/tsconfig.json index 6be4163a..0cc4be34 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,7 +6,8 @@ "noEmitOnError": true, "lib": ["es2015", "dom"] // "noImplicitAny": true - // "strict": true + // "strict": true, + // "strictFunctionTypes": true }, "include": ["./src/*.ts"] // "include": ["./types/*.ts"]