-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion: #error directive #3575
Comments
Can you share a scenario where this is useful in the absence of conditional compilation using preprocessor directives (i.e. |
Any block of code that is left unfinished during refactoring and requiring
|
A error raised should not be an early one like those of syntax, should be raised while doing senatic checking. |
Is // TODO (and an editor supporting task lists) and "throw new Error('not yet implemented')" that much worse? You lose a little compile time checking but little else. You could also use a linter to catch this kind of thing at compile time with some custom tag (// #error). |
True. Anything can be done with extra syntax served in comments and a
|
Btw are there any plans to marry TypeScript with the Task list in Visual
|
Yep, VS2015 already has the Task List wired up like that. |
you can just use |
possibly reconsider if an applicable form of conditional compilation (#3538) is supported. |
C# and C++ have a handy
#error
directive that results to a compiler error. It would not hurt to have something similar in TypeScript:The text was updated successfully, but these errors were encountered: