agiletortoise/drafts-script-reference

`Todoist.create()` documentation says argument is optional, but type def does not reflect that

Opened this issue · 0 comments

Playing around with the Todoist integration for scripting, and my linter in VSCode was yelling at me because of the the following:

CleanShot Code 2022-02-06 at 22 18 52

I think it's because this:

/**
* Creates a new Todoist object.
* @param identifier Optional string value used to identify a Todoist account. Typically this can be omitted if you only work with one Todoist account in Drafts. Each unique identifier used for Todoist accounts will share credentials - across both action steps and scripts.
*/
static create(identifier: string): Todoist

Needs to be:

static create(identifier?: string): Todoist

When I fixed that locally, my linter stopped complaining.