We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Task, AddTaskArgs, and UpdateTaskArgs are missing the type for duration property or related.
Task
AddTaskArgs
UpdateTaskArgs
Task should have a duration property.
duration
// src/types/entities.ts // ... export const BiggetThanZero = Number.withConstraint(n => n > 0); export type BiggerThanZero Static<typeof BiggerThanZero> export const Unit = Union(Literal('minute'), Literal('day')) export type Unit = Static<typeof Unit> export const Duration = Record({ amount: BiggerThanZero unit: Unit }) export type Duration = Static<typeof Duration> export const Task = Record({ // ... duration: Duration.Or(Null) }) // ...
AddTaskArgs and UpdateTaskArgs should have a duration and duration_unit property.
duration_unit
// src/types/requests.ts export type WithDuration = { duration: BiggerThanZero duration_unit: Unit } // ... export type AddTaskArgs = AddTask | (AddTask & WithDuration) // ... export type UpdateTaskArgs = UpdateTask | (UpdateTask & WithDuration) // ...
Yes
api.getTask('[taskId]') .then((task) => { const duration = task.duration // <- ts-error: Property 'duration' does not exist on // type '{ id: string; order: number. ... }' console.log(duration) })
There is an issue open on the Python API repository for the same thing: Doist/todoist-api-python#108
The text was updated successfully, but these errors were encountered:
Thank you for the report @thales-fukuda. Is this something you'd like to create a PR for?
Sorry, something went wrong.
I would be glad to contribute!
I couldn't find much information on contribution guidelines for this repository, is there something I should be aware of?
Thank you. There's nothing to be aware of 👍
Hey @henningmu, here is the PR: #242
Successfully merging a pull request may close this issue.
Bug description
Task
,AddTaskArgs
, andUpdateTaskArgs
are missing the type for duration property or related.Expected behaviour
Task should have a
duration
property.AddTaskArgs and UpdateTaskArgs should have a
duration
andduration_unit
property.Is reproducible
Yes
To reproduce
Version information
Additional information
There is an issue open on the Python API repository for the same thing: Doist/todoist-api-python#108
The text was updated successfully, but these errors were encountered: