Agreed it has been abused. On the other hand, if you adhere to a computational theory of mind and see the mind as computation over a formal system, then it is saying something about the mind and the fact that some…
> What I really miss is the ability to say that what is the return type of the method Agreed! There's an open issue that addresses that scenario (and a ton of others): https://github.com/Microsoft/TypeScript/issues/6606
I've been using discriminated unions on TS 2 to do this, and works quite well. Example: const INCREMENT: "increment" = "increment"; const DECREMENT: "decrement" = "decrement"; interface Increment { type: typeof…
Thanks, it does make more sense now.
The odd thing is that they are not using three: public connectorsEnabled(enabled: boolean): this; public connectorsEnabled(): boolean; public connectorsEnabled(enabled?: boolean): any { if (enabled == null) { return…
Agreed it has been abused. On the other hand, if you adhere to a computational theory of mind and see the mind as computation over a formal system, then it is saying something about the mind and the fact that some…
> What I really miss is the ability to say that what is the return type of the method Agreed! There's an open issue that addresses that scenario (and a ton of others): https://github.com/Microsoft/TypeScript/issues/6606
I've been using discriminated unions on TS 2 to do this, and works quite well. Example: const INCREMENT: "increment" = "increment"; const DECREMENT: "decrement" = "decrement"; interface Increment { type: typeof…
Thanks, it does make more sense now.
The odd thing is that they are not using three: public connectorsEnabled(enabled: boolean): this; public connectorsEnabled(): boolean; public connectorsEnabled(enabled?: boolean): any { if (enabled == null) { return…