You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You'd never put # as an object name for a sane reason... but sometimes you have to deal with CSV. According to the JSDoc docs, it seems like this should do the job:
Is there a way to add descriptions to a member with this alternate style? I cannot get vscode to be happy with any variation I attempt
/**
* @typedef {{
* "Emp#": string, // want to give context to Emp# here
* "First Name": string,
* }} EmpCsv
*/
I tried a couple of workarounds to no avail. Is there any functioning syntax where we can add normal, full-fledged annotation with description to a special character field name?
Edit: The best I've done so far is doing the jankiness below for the special character fields.
/**
* @typedef FooHelperProps
* @property {string} fooField - Can still annotate regular fields at least
*
*/
/**
* @typedef {FooHelperProps & {":specialField": any[]}} FooProps // Can't annotate ":specialField"
*/
You'd never put
#
as an object name for a sane reason... but sometimes you have to deal with CSV. According to the JSDoc docs, it seems like this should do the job:But I get errors...
Asked at https://stackoverflow.com/questions/68946492/how-can-i-escape-special-characters-names-in-jsdoc-typescript.
The text was updated successfully, but these errors were encountered: