I have a JSDoc comment of a typedef like below,
/**
* Lorem ipsum dolor...
* @typedef {Object} NotificationOptions
* @property {boolean} foo - Property 1
* @property {boolean} bar - Property 2
*/
How to add any additional properties to the object besides foo and bar? (the property can be anything with any type, thus the type is flexible)
I had an example on typescript interface definition like below. I wanted my JSDoc to have similar effect with this interface definition on TS.
export interface FooBar {
foo: boolean;
bar: boolean;
[key: string]: any;
}
I know it is optional and the code can run buttery smooth without the typedef. Just curious and wanted to had a clean and good code.
Thank you!