Skip to content

Error from parameter assignability incorrectly reported on satisfies keyword Β #56433

Closed
@ssalbdivad

Description

@ssalbdivad

πŸ”Ž Search Terms

satisfies, error, reporting, span, call, function

πŸ•— Version & Regression Information

  • This changed between versions 5.0 and 5.1

⏯ Playground Link

https://tsplay.dev/mMl61N

πŸ’» Code

const f = (s: { a: true }) => {}

// I would expect the error to span:
// a) "{}" (Ideal IMO)
// b) "{} satisfies unknown" (A little messier but not wrong- this was the 5.0 behavior)

// The error is instead reported only on "satisfies" despite {} satisfying unknown
f({} satisfies unknown)

πŸ™ Actual behavior

(see example)

πŸ™‚ Expected behavior

(see example)

Additional information about the issue

No response

Metadata

Metadata

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions