Please tell me: how to refer to a private class field in typescript jsdoc?
script.js:
// @ts-check
class C {
/** @type { null | string | number } */
#x = null;
// /** @type { ( x : C[ 'x' ] ) => void } */
// /** @type { ( x : this[ 'x' ] ) => void } */
// /** @type { ( x : this[ '#x' ] ) => void } */
// /** @type { ( x : this[ #x ] ) => void } */
// /** @type { ( x : this#x ) => void } */
// /** @type { ( x : this.#x ) => void } */
// /** @type { ( x : this[ #'x' ] ) => void } */
f( x ) { };
};
This is an open issue in Typescript itself. But there is a workaround to get what you want.