Closed
Description
π Search Terms
jsdoc satisfies
π Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about
satisfies
β― Playground Link
π» Code
/** @satisfies {(uuid: string) => void} */
const myFunction = uuid => {}
/** @typedef {Parameters<typeof myFunction>} Foo */
// ^^^
// Hover over `Foo` and observe that it is `never`
π Actual behavior
Type of Foo
is never
.
π Expected behavior
Type of Foo
should be [uuid: string]
Additional information about the issue
In the playground link above I have enabled strictNullChecks
, but when you disable this, the parameter becomes optional. I.e. [uuid?: string]
, which is still incorrect. (playground link)
For reference, the same code in TypeScript works as expected: playground link.