8 ms·
I think they’re worried about the opposite, forgetting to put using when you needed it
by circuit10 3y ago
I think they’re worried about the opposite, forgetting to put using when you needed it
- tracker1 3y agoGiven my experience with TS, would assume the opposite is also true. Will likely lint for manual call or for using.
- Kuraj 3y ago> Will likely lint for manual call or for using. That's a safe bet. TypeScript's ability to detect problems in the code seems superior than what Visual Studio ships with for C# - for example it doesn't warn about forgetting to `await` a method call.
- sippeangelo 3y agoBut if the opposite was true, why do I have to specify it at all? Why can’t it free on scope exit like any other language, with “let”?
- tracker1 3y agoBecause it will run in JS and you can do stuff like return something with a lifetime to be scoped at a higher level. Is there too declare intent. Typescript is just really advanced linting.