-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Description
π Search Terms
jsdoc set
π Version & Regression Information
- This changed between versions 4.2 and 4.3
- I was unable to test this on prior versions because 4.3 added support for separate write types on properties.
β― Playground Link
π» Code
export class VFile {
/**
* @returns {string}
*/
get path() {
return ''
}
/**
* @param {URL | string} path
*/
set path(path) {
}
}
const file = new VFile()
file.path = '/some/path'
file.path = new URL('file:///some/path')
π Actual behavior
- βοΈ The setter type annotation is used for type checking the setter
- β The getter type annotation is emitted as the setter type in the
.d.ts
file
π Expected behavior
The setter type annotation should be emitted as the setter type
Additional information about the issue
This only affects types in JSDoc. Correct types are emitted for the equivalent TypeScript code.
Metadata
Metadata
Assignees
Labels
No labels