Decorated properties that use `@internal` in their JSDoc comment fail to parse
claviska opened this issue · 2 comments
claviska commented
Playground issue
Additional information:
I noticed this by chance and figured I'd report it. This only seems to affected decorated properties. I can't get it to break with state or method fields.
Note that removing @internal
from the comment eliminates the error. I've pasted the full dump below in case it helps.
Show Error Log
TypeError: Cannot read properties of undefined (reading 'name')
at createAttributeFromField (file:///Users/example/path/node_modules/@custom-elements-manifest/analyzer/src/features/analyse-phase/creators/createAttribute.js:11:22)
at file:///Users/example/path/node_modules/@custom-elements-manifest/analyzer/src/features/framework-plugins/lit/property-decorator.js:60:27
at Array.forEach (<anonymous>)
at handlePropertyDecorator (file:///Users/example/path/node_modules/@custom-elements-manifest/analyzer/src/features/framework-plugins/lit/property-decorator.js:50:23)
at analyzePhase (file:///Users/example/path/node_modules/@custom-elements-manifest/analyzer/src/features/framework-plugins/lit/property-decorator.js:30:11)
at file:///Users/example/path/node_modules/@custom-elements-manifest/analyzer/src/create.js:105:23
at withErrorHandling (file:///Users/example/path/node_modules/@custom-elements-manifest/analyzer/src/utils/index.js:58:5)
at file:///Users/example/path/node_modules/@custom-elements-manifest/analyzer/src/create.js:104:7
at Array.forEach (<anonymous>)
at visitNode (file:///Users/example/path/node_modules/@custom-elements-manifest/analyzer/src/create.js:103:19)
at withErrorHandling (file:///Users/example/path/node_modules/@custom-elements-manifest/analyzer/src/utils/index.js:67:11)
at file:///Users/example/path/node_modules/@custom-elements-manifest/analyzer/src/create.js:104:7
at Array.forEach (<anonymous>)
at visitNode (file:///Users/example/path/node_modules/@custom-elements-manifest/analyzer/src/create.js:103:19)
at visitNodes (/Users/example/path/node_modules/@custom-elements-manifest/analyzer/node_modules/typescript/lib/typescript.js:29004:30)
at Object.forEachChild (/Users/example/path/node_modules/@custom-elements-manifest/analyzer/node_modules/typescript/lib/typescript.js:29243:24)
at visitNode (file:///Users/example/path/node_modules/@custom-elements-manifest/analyzer/src/create.js:109:8)
at analyze (file:///Users/example/path/node_modules/@custom-elements-manifest/analyzer/src/create.js:100:3)
at file:///Users/example/path/node_modules/@custom-elements-manifest/analyzer/src/create.js:51:5
at Array.forEach (<anonymous>)
node:internal/errors:857
const err = new Error(message);
^
claviska commented
I can confirm that this works as expected in 0.6.7. Many thanks!