Skip to content

stricter jsdoc type resolution causes weird behaviour for value-only declarations #33106

Closed
@sandersn

Description

@sandersn
/** @param {Image} image */
function process(image) {
}

Expected behavior:

  1. Error "'Image' refers to a value, but is being used as a type here." and image: any, as TS does.
  2. No error, and image: typeof Image, as we often do in JS.

I think I prefer (2), but after the stricter-jsdoc-type-resolution PR, I expected (1), which is also OK.

Actual behavior:
No error and image: any.

Metadata

Metadata

Assignees

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