Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

278
Views
JSDoc how to add any additional properties of an Object?

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!

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!