Merge pull request #646 from dragomirtitian/master

Fixed error when using `strictFunctionType` in typescript caused by t…
This commit is contained in:
Anton Lavrenov
2019-05-09 08:20:34 -05:00
committed by GitHub

View File

@@ -13,6 +13,10 @@ import { _registerNode } from './Global';
import { GetSet, Vector2d } from './types';
export type ShapeConfigHandler<TTarget> = {
bivarianceHack(ctx: Context, shape: TTarget): void
}['bivarianceHack']
export interface ShapeConfig extends NodeConfig {
fill?: string;
fillPatternImage?: HTMLImageElement;
@@ -748,11 +752,11 @@ export class Shape<Config extends ShapeConfig = ShapeConfig> extends Node<
fillPatternX: GetSet<number, this>;
fillPatternY: GetSet<number, this>;
fillPriority: GetSet<string, this>;
hitFunc: GetSet<(ctx: Context, shape: this) => void, this>;
hitFunc: GetSet<ShapeConfigHandler<this>, this>;
lineCap: GetSet<string, this>;
lineJoin: GetSet<string, this>;
perfectDrawEnabled: GetSet<boolean, this>;
sceneFunc: GetSet<(ctx: Context, shape: this) => void, this>;
sceneFunc: GetSet<ShapeConfigHandler<this>, this>;
shadowColor: GetSet<string, this>;
shadowEnabled: GetSet<boolean, this>;
shadowForStrokeEnabled: GetSet<boolean, this>;