I am preparing externs for PIXI.js library. I am getting the following warning:
js/Test.js:188: WARNING - Property position never defined on PIXI.Sprite
button.position.y = y;
Here are the relevant extern definitions:
//UPDATE
/**
* @constructor
* @extends {PIXI.Container}
* @param {PIXI.Texture} texture
*/
PIXI.Sprite = function(texture){};
/**
* @constructor
* @extends {PIXI.DisplayObject}
*/
PIXI.Container = function(){};
/**
* @constructor
* @extends {PIXI.EventEmitter}
*/
PIXI.DisplayObject = function(){};
/**
* @type {PIXI.Point}
*/
PIXI.DisplayObject.position;
Still getting the same warning.
What am I doing wrong?
When I am replacing PIXI.DisplayObject.position;
with PIXI.DisplayObject.prototype.position;
that seems to clear the warning.
Does it mean that I should always define SomeObject.prototype.prop
rather then SomeObject.prop
?