Sometimes it is desired to forbid certain types from being considered.
Example: JSON.stringify(function() {});
doesn't make sense and the chance is high it's written like this by mistake. With negated types we could eliminate a chance of it.
type Serializable = any ~ Function; // or simply ~ Function declare interface JSON { stringify(value: Serializable): string; }
Another example
export NonIdentifierExpression = ts.Expression ~ ts.Identifier
jcalz, zheeeng, huafu, the1mills, jsamr and 110 moreRudxain, jasikpark, doeixd, yacodes, StepaZol and 1 morehaltcase, borgesius, k-tten, antonilol, Gabriel-ISS and 16 morehaltcase, lgenzelis, borgesius, k-tten, truemogician and 8 more
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4