Umn... typescript/jsondoc can definitely help you with this issue.
/**
* Function for creating a new user in the system.
*
* @param user The username to generate an account for
* @param isAdmin If the user is an administrator
* @param sendWelcomeEmail If the system should send a welcome email
*/
export function createUser(user: string, isAdmin: boolean, sendWelcomeEmail: boolean) {
...
}
You need to specify the additional documentation at the method's source. With the documentation added above, the language module in your editor should allow for proper autocomplete.
Note: The JSDoc syntax for bare JS is very similar, you just have to define the type within the comment syntax.
That said, using a parameters object is often better for cases like this, where you may want a lot of optional parameters and additional details as part of this.
Umn... typescript/jsondoc can definitely help you with this issue. /** * Function for creating a new user in the system. * * @param user The username to generate an account for * @param isAdmin If the user is an administrator * @param sendWelcomeEmail If the system should send a welcome email */ export function createUser(user: string, isAdmin: boolean, sendWelcomeEmail: boolean) { ... } You need to specify the additional documentation at the method's source. With the documentation added above, the language module in your editor should allow for proper autocomplete. Note: The JSDoc syntax for bare JS is very similar, you just have to define the type within the comment syntax. That said, using a parameters object is often better for cases like this, where you may want a lot of optional parameters and additional details as part of this.