Identifier Expected when declaring a property with white space for JSDoc typescript

Viewed 262

I am just trying out TypeScript for the first time today on a JS file. I don't want to use the compilation, I just want TS to do some light type checking with JSDoc comment to add type.

I have something like

/**
 * @typedef {Object} CustomData
 * @property {Array} "My Property"
 */

Since the property has a white space in it, I had to put the quotes around it. However, this creates an error error TS1003: Identifier expected.

The error seems to be with the use of ". How else can I declare a property with whitespace in a JSDoc comment syntax for Typescript?

0 Answers
Related