Skip to content

Commit

Permalink
typescript fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lavrton committed May 9, 2019
1 parent 4d3f9b2 commit 1a23923
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ nbproject
*.sublime-project
*.sublime-workspace
*.md.html
.vscode

# Dreamweaver added files
_notes
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion konva.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion konva.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 3 additions & 2 deletions src/Shape.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<TTarget> = {
bivarianceHack(ctx: Context, shape: TTarget): void
}['bivarianceHack']
bivarianceHack(ctx: Context, shape: TTarget): void;
}['bivarianceHack'];

export interface ShapeConfig extends NodeConfig {
fill?: string;
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"noEmitOnError": true,
"lib": ["es2015", "dom"]
// "noImplicitAny": true
// "strict": true
// "strict": true,
// "strictFunctionTypes": true
},
"include": ["./src/*.ts"]
// "include": ["./types/*.ts"]
Expand Down

0 comments on commit 1a23923

Please sign in to comment.