Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
saguiar
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
saguiar
10y ago
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 (true) sentences cannot b
2.
▲
by
saguiar
10y ago
> 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
3.
▲
by
saguiar
10y ago
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
4.
▲
by
saguiar
10y ago
Thanks, it does make more sense now.
5.
▲
by
saguiar
10y ago
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) { ret