-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Avoid confusing TS9025 error in isolatedDeclarations
#60129
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
Avoid confusing TS9025 error in isolatedDeclarations
#60129
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is okay; erroring code will emit an error elsewhere, so letting declaredParameterTypeContainsUndefined
"lie" a little to prevent follow-ons feels fine.
And in the case like: // @ts-ignore
import { DoesNotExist } from "foo";
export class Bar {
constructor(private x?: DoesNotExist | undefined) {}
} The "worst thing" that happens here is that |
Ah, you already have that as a test via |
|
||
export function test1(x?: Array | undefined): void {} | ||
|
||
export function test2(x?: Unresolved | undefined): void {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export function test2(x?: Unresolved | undefined): void {} | |
export function test2(x?: Unresolved | undefined): void {} | |
export function test3(x?: Unresolved): void {} |
Maybe this extra test would be valuable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, i just pushed it out
fixes #60123