Skip to content

TS8040: A JSDoc '@type' tag may not occur with a '@param' or '@returns' tag. #1970

@JakobJingleheimer

Description

@JakobJingleheimer

Steps to reproduce

/**
 * @typedef {object} AliasInitConfig
 * @prop {`file://${string}`} AliasInitConfig.location The name or fully resolved location of the tsconfig.
 */
/**
 * @type {import('node:module').InitializeHook}
 * @param {AliasInitConfig} [config] Configuration object to customise Alias loader.
 */
function initialiseAlias(config) {
}

Behavior with typescript@5.8

It works fine

Behavior with tsgo

It (incorrectly) errors


Possibly fixed by #1960 (description looks kinda related).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions