We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
From vscode: src/vs/workbench/contrib/search/common/searchModel.ts
Code
interface F { d(): void } export function doRemove(dds: F | F[]) { if (!Array.isArray(dds)) { dds = [dds] } for (let n of dds) { n.d() } return dds }
Expected behavior:
No error, and n: F at all locations, and dds: F[] at all locations.
n: F
dds: F[]
Actual behavior:
Types are correct; bogus error: 'F | F[]' must have a 'Symbol.iterator' method that returns an iterator.
Looks like narrowing works as expected, except for errors.
The text was updated successfully, but these errors were encountered:
For future bisecting: Doesn't repro on a commit from March 2: dd6811f
Sorry, something went wrong.
Pick up latest TypeScript@next
2b9e8b4
Fixes one type check issue and works around microsoft/TypeScript#37480
ahejlsberg
Successfully merging a pull request may close this issue.
From vscode: src/vs/workbench/contrib/search/common/searchModel.ts
Code
Expected behavior:
No error, and
n: F
at all locations, anddds: F[]
at all locations.Actual behavior:
Types are correct; bogus error: 'F | F[]' must have a 'Symbol.iterator' method that returns an iterator.
Looks like narrowing works as expected, except for errors.
The text was updated successfully, but these errors were encountered: