You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When fetching projects from an organization with await organization.fetch('projects'); (see for example this line in documentation) Typescript will throw an error like this:
Expected 2 arguments, but got 1.ts(2554)
transifexApi.d.ts(20, 35): An argument for 'force' was not provided.
(method) JsonApiResource.fetch(relationshipName: string, force: boolean): Promise<JsonApiResource | Collection>
Expected Behavior
As force is an optional parameter that defaults to false, the end developer should not be required to provide a value simply to satisfy the typechecker.
Steps to Reproduce
In a TypeScript module working with @transifex/api package, add this line and you should see the error while typechecking.
Current Behavior
When fetching projects from an organization with
await organization.fetch('projects');
(see for example this line in documentation) Typescript will throw an error like this:Expected Behavior
As
force
is an optional parameter that defaults tofalse
, the end developer should not be required to provide a value simply to satisfy the typechecker.Steps to Reproduce
In a TypeScript module working with
@transifex/api
package, add this line and you should see the error while typechecking.Possible Solution
Update this line in
transifexApi.d.ts
so thatforce
is optional: https://github.com/transifex/transifex-javascript/blob/master/packages/api/src/transifexApi.d.ts#L20old:
new:
Possible Implementation
n/a
The text was updated successfully, but these errors were encountered: