Skip to content

[Typescript] Moment types have been updated #982

@jovpet

Description

@jovpet

Moment-timezone version which you use:

Version:

0.5.34 (latest)

Issue description:

Original Moment types have been updated, in version 2.29.3, and due to that fact typescript complains:

TS2352: Conversion of type 'import("node_modules/moment-timezone/node_modules/moment/ts3.1-typings/moment").Moment' to type 'moment.Moment' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.   The types returned by 'toArray()' are incompatible between these types.     Type 'number[]' is not comparable to type '[number, number, number, number, number, number, number]'.       Target requires 7 element(s) but source may have fewer.

temporary fix would be to do conversion to unknown first, but this should be fixed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions