Skip to content

Conversation

engfragui
Copy link
Contributor

@engfragui engfragui commented Oct 11, 2022

While working on https://github.com/Doist/integrations-backlog/issues/418 (upgrade Todoist-Outlook to API v2), I've noticed that some of the errors and test failures looks something like:

      Type '{ ...; }' is not assignable to type 'EntityInHierarchyWithIndent'.
        Type '{ ...; }' is not assignable to type 'Partial<EntityInHierarchy>'.
          Types of property 'parentId' are incompatible.
            Type 'string | null | undefined' is not assignable to type 'number | undefined'.
              Type 'null' is not assignable to type 'number | undefined'.

Since the API v2 now treats all ids as strings (i.e. projectIds, sectionIds, taskIds, etc.), it makes sense to change this EntityInHierarchy.parentId to string as well.

This is apparently only used in Todoist-Outlook (https://github.com/search?l=TypeScript&q=org%3ADoist+EntityInHierarchy&type=Code) so this seems like a safe change.

@engfragui engfragui requested review from a team and pawelgrimm and removed request for a team October 11, 2022 14:18
@engfragui engfragui self-assigned this Oct 11, 2022
@engfragui engfragui merged commit d566c27 into main Oct 11, 2022
@engfragui engfragui deleted the francesca/strings branch October 11, 2022 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants