Depending on how complex the alias method is, this could become somewhat ugly I think.
For now I am doing the following but I am pretty sure the compiler does not recognize it correctly since b.prototype.c is not an instance but an alias.
/**
* @constructor
*/
var a = function() {};
a.prototype.c = function() {};
/**
* @constructor
*/
var b = function() {};
/**
* @type {a.prototype.c}
*/
b.prototype.c = a.prototype.c;
I also don't know if the following might work:
/**
* @alias a.prototype.c
*/
b.prototype.c = a.prototype.c;
More ideas?
Am Montag, 11. März 2013 01:54:20 UTC+1 schrieb Alan:
Would @typedef work for you?
Hi,
let's say I have to declarations.
var a = function() {}
var b = function() {}
a.prototype.c = b.prototype.c = function() {}
What's the recommended way for putting that, non-inheritance, down to an extern without just duplicating?
--
---
You received this message because you are subscribed to the Google Groups "Closure Compiler Discuss" group.