Closed
Description
TypeScript Version: 3.7.4
Search terms
duplicate identifier typedef jsdoc
Code
duplicate-identifier-expression.js
//@ts-check
/** @typedef {object} NotADuplicateIdentifier */
(2 * 2)
Expected behavior:
Compiles without error
Actual behavior:
$ env PATH="${PATH}:../slime/local/jsh/lib/node/bin" ../slime/local/jsh/lib/node/bin/tsc duplicate-identifier-expression.js --allowJs --noemit
duplicate-identifier-expression.js:2:23 - error TS2300: Duplicate identifier 'NotADuplicateIdentifier'.
2 /** @typedef {object} NotADuplicateIdentifier */
~~~~~~~~~~~~~~~~~~~~~~~
Found 1 error.
Notes:
- Did not see equivalent error for
.ts
file. - Did not see equivalent error when expression not enclosed in parentheses.
Playground Link:
Could not recreate there.
Related Issues:
None found.