3 ms·
Typescript is perfectly capable of telling you what the return type is without needing you to manually specify it.
by efdee 6y ago
Typescript is perfectly capable of telling you what the return type is without needing you to manually specify it.
- Androider 6y agoIt tells you what the function return type is, which isn't necessarily the same as the return type you might have manually typed or intended. For example, undefined's sneaking into the type because of branching code.