how i can disable this kind of error in my whole project or maybe a work around ?
Type of property 'UID' circularly references itself in mapped type 'Partial'.ts(2615)
So here the issue with js and vscode.
If i say data type is /** @param {A} [data] */
the error are from new A({}) instance, i need fully fill the partial object or i get linter error !
if i say data type is a partial obj /** @param {Partial<A>} [data] */, now new A({}) work fine, but i get linter error to constructor !
And if i say /** @param {A|Partial<A>} [data] */ , no more error ! but all props became undefined (any) and lost types !!!
Vscode IntelliSense seem little bit lost in this case. !
here a sample code, how i can say Data is a partial objet, but if nothing, default are set !!!!
test case: /** @param {A} [data]*/ - /** @param {Partial<A>} [data] */ - /** @param { A | Partial<A>} [data] */
export class A {
/** @param {Partial<A>} [data] */ // how say is partial and also default ?
constructor(data) {
/** uid global du data */
this.UID = data.UID || 'noUID';
this.prop = data.prop || {};
}
get VIEW() {
return this.constructor.name;
}
}
const a = new A ({UID:'g42t'})
Thanks for any help or suggest,
I would like an effective solution which allows to have a good workflow, without repetitions
i also open issue here, if is a bug ? https://github.com/microsoft/vscode/issues/108062



