In JS, type annotations should not block errors from the rest of the program #23472
Labels
Awaiting More Feedback
This means we'd like to hear from more people who would be helped by this feature
Domain: JavaScript
The issue relates to JavaScript specifically
Suggestion
An idea for TypeScript
In a Javascript file that is checked by flow, we may see code like this (from create-react-app/packages/react-error-overlay/src/utils/parseCompileError.js)
This behaves badly when the typescript compiler compiles it with checkJs on:
Expected behavior:
Actual behavior:
In the language service:
2. message, lines, etc have the correct types, but ErrorLocation is type any.
3. If they are used incorrectly, they have errors.
In batch compilation:
2. No errors show up except those from (1), even if there are lots of other javascript files without type annotations.
The text was updated successfully, but these errors were encountered: