You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actual behavior:
example.ts(8,1): error TS2532: Object is possibly 'undefined'.
The error is on the gen.throw() line.
I have already tried putting undefined checks, assigning a local variable, trycatch blocks etc in the code but the error persists.
The text was updated successfully, but these errors were encountered:
I'll raise this as a question on SO rather than a bug here.
Now that I see that the Iterator declaration has the throw and return functions marked as optional.
TypeScript Version: 2.1.1
Code
Compiled with the command
tsc --strictNullChecks --target ES6 example.ts
Expected behavior:
Compilation passes successfully.
Actual behavior:
example.ts(8,1): error TS2532: Object is possibly 'undefined'.
The error is on the gen.throw() line.
I have already tried putting undefined checks, assigning a local variable, trycatch blocks etc in the code but the error persists.
The text was updated successfully, but these errors were encountered: