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
/** @satisfies {(uuid: string) => void} */constmyFunction=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.
The text was updated successfully, but these errors were encountered:
The problem is in the getSignatureFromDeclaration and its isUntypedSignatureInJSFile check - it doesn't account for @satisfies. I'll put up a PR with a fix for this today.
π Search Terms
jsdoc satisfies
π Version & Regression Information
satisfies
β― Playground Link
https://www.typescriptlang.org/play?strictNullChecks=true&filetype=js#code/PQKhAIAEGcEMBcCW0BmiCm1wG8AUBXfRAEwC5xp4AnRAOwHMBKcAXgD5wA3AexIF9wIYACgAxt1qVwAWwCeAMXy1RSCa3CESrDtj7DhoCJHiyADumLoUOAAqwqsaenjoq0ADwnz3a3MXLVWjYBeW5uQRFgYHAY2Lj4hMSkxIA9NINo5Ky4gAluTldwfMKAA1DuEvBYWmIigCNoVwLweAALBHBEeE6sEtp0AqoS4SA
π» Code
π Actual behavior
Type of
Foo
isnever
.π 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.
The text was updated successfully, but these errors were encountered: