#this return type for static methods?
21 messages · Page 1 of 1 (latest)
@uneven hornet Doesn't really exist
There's a few workarounds in that thread though.
(I'm assuming you meant class B extends A in your example)
ya
thx you anyway
Bruh its more like 6 years open and its not still improved / fixed
/resolve
!close
!open
@outer stag I am useing the JSDocs actually but is there way to redefine the types without creating the new method in that class? like virtual method
TS doesn't prioritize changes based on how long the relative tickets have been open. (Really, nobody does)
FWIW, using JSDoc shouldn't really affect things - I think basically all the features of TS are available through JSDoc notations nowadays.
not sure if i describe it correctly here is example:
class A{
/* @returns {A}*/
static Open(){return new this();}
}
class B extends A{
/**
* @static
* @method Open
* @returns B
*/
}
is that possible to change the type like this without implementing it?
@outer stag sorry this is last question
Don't think so, no.
Thank you for everything
Some of the workarounds in the linked issue may still work with JSDoc syntax though
i going to look at that
thx