fix types

This commit is contained in:
Anton Lavrenov 2019-07-31 21:20:27 +07:00
parent 39526cfce7
commit b0a45caee4
4 changed files with 8 additions and 8 deletions

View File

@ -2095,7 +2095,7 @@
* @param {Function} func function executed on each animation frame. The function is passed a frame object, which contains
* timeDiff, lastTime, time, and frameRate properties. The timeDiff property is the number of milliseconds that have passed
* since the last animation frame. The lastTime property is time in milliseconds that elapsed from the moment the animation started
* to the last animation frame. The time property is the time in milliseconds that ellapsed from the moment the animation started
* to the last animation frame. The time property is the time in milliseconds that elapsed from the moment the animation started
* to the current animation frame. The frameRate property is the current frame rate in frames / second. Return false from function,
* if you don't need to redraw layer/layers on some frames.
* @param {Konva.Layer|Array} [layers] layer(s) to be redrawn on each animation frame. Can be a layer, an array of layers, or null.
@ -9818,8 +9818,8 @@
* get/set image source. It can be image, canvas or video element
* @name Konva.Image#image
* @method
* @param {Number} y
* @returns {Number}
* @param {Object} image source
* @returns {Object}
* @example
* // get value
* var image = shape.image();

View File

@ -20,7 +20,7 @@ var now = (function() {
* @param {Function} func function executed on each animation frame. The function is passed a frame object, which contains
* timeDiff, lastTime, time, and frameRate properties. The timeDiff property is the number of milliseconds that have passed
* since the last animation frame. The lastTime property is time in milliseconds that elapsed from the moment the animation started
* to the last animation frame. The time property is the time in milliseconds that ellapsed from the moment the animation started
* to the last animation frame. The time property is the time in milliseconds that elapsed from the moment the animation started
* to the current animation frame. The frameRate property is the current frame rate in frames / second. Return false from function,
* if you don't need to redraw layer/layers on some frames.
* @param {Konva.Layer|Array} [layers] layer(s) to be redrawn on each animation frame. Can be a layer, an array of layers, or null.

View File

@ -1,4 +1,4 @@
import { Util, Collection } from './Util';
import { Util, Collection, Point } from './Util';
import { Container, ContainerConfig } from './Container';
import { Node } from './Node';
import { Factory } from './Factory';
@ -252,7 +252,7 @@ export abstract class BaseLayer extends Container<Group | Shape> {
'Can not change height of layer. Use "stage.height(value)" function instead.'
);
}
getIntersection(pos, selector?) {
getIntersection(pos: Point, selector?: string) {
return null;
}

View File

@ -1,4 +1,4 @@
import { Util, Collection } from './Util';
import { Util, Collection, Point } from './Util';
import { Container } from './Container';
import { Factory } from './Factory';
import { BaseLayer } from './BaseLayer';
@ -77,7 +77,7 @@ export class Layer extends BaseLayer {
* // or if you interested in shape parent:
* var group = layer.getIntersection({x: 50, y: 50}, 'Group');
*/
getIntersection(pos, selector) {
getIntersection(pos: Point, selector?: string) {
var obj, i, intersectionOffset, shape;
if (!this.hitGraphEnabled() || !this.isVisible()) {