-
Notifications
You must be signed in to change notification settings - Fork 12.8k
TS looses previously determined type #48901
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
Labels
Duplicate
An existing issue was already created
Comments
Self contained example: let errorActions: readonly string[] | undefined = undefined;
if (Array.isArray(errorActions)) {
// check errorActions here
console.log(errorActions)
} |
Duplicate of #17002 |
This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See how
errorWithActions
becomesany[]
becauseArray.isArray()
is used:https://github.com/microsoft/vscode/blob/cffd590665a0271a05ad90dbb3c708d156c3008b/src/vs/workbench/browser/parts/editor/editorPanes.ts#L155
https://github.com/microsoft/vscode/blob/cffd590665a0271a05ad90dbb3c708d156c3008b/src/vs/workbench/browser/parts/editor/editorPanes.ts#L162
The text was updated successfully, but these errors were encountered: