-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Do not report errors when inference is partially blocked #52728
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
///<reference path="fourslash.ts"/> | ||
// @strict: true | ||
//// | ||
//// declare function func<T extends { foo: 1 }>(arg: T): void; | ||
//// func({ foo: 1, bar/*1*/: 1 }); | ||
|
||
goTo.marker("1"); | ||
verify.completions({ exact: undefined }); | ||
verify.noErrors(); | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
///<reference path="fourslash.ts"/> | ||
// @strict: true | ||
//// | ||
//// // repro from #50818#issuecomment-1278324638 | ||
//// | ||
//// declare function func<T extends { foo: 1 }>(arg: T): void; | ||
//// func({ foo: 1, bar/*1*/: 1 }); | ||
|
||
goTo.marker("1"); | ||
edit.insert("2"); | ||
verify.completions({ exact: undefined }); | ||
verify.noErrors(); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
///<reference path="fourslash.ts"/> | ||
// @strict: true | ||
//// | ||
//// // repro from #52580#issuecomment-1416131055 | ||
//// | ||
//// type Funcs<A, B extends Record<string, unknown>> = { | ||
//// [K in keyof B]: { | ||
//// fn: (a: A, b: B) => void; | ||
//// thing: B[K]; | ||
//// } | ||
//// } | ||
//// | ||
//// function foo<A, B extends Record<string, unknown>>(fns: Funcs<A, B>) {} | ||
//// | ||
//// foo({ | ||
//// bar: { fn: (a: string, b) => {}, thing: "asd" }, | ||
//// /*1*/ | ||
//// }); | ||
|
||
goTo.marker("1"); | ||
const markerPosition = test.markers()[0].position; | ||
edit.paste(`bar: { fn: (a: string, b) => {}, thing: "asd" },`) | ||
edit.replace(markerPosition + 4, 1, 'z') | ||
verify.completions({ isNewIdentifierLocation: true }); | ||
verify.noErrors(); | ||
Comment on lines
+20
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was an interesting case because the whole argument got blocked and thus |
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.
this was reporting excess property check - I still think that perhaps it shouldn't cause applicability error in this case when requesting completions but that's a separate problem