Skip to content

How can I use moment-timezone with 10 year data range with Typescript types #1089

@garethdn

Description

@garethdn

If I import moment timezone with

import * as moment from 'moment-timezone';

I get all the required typings but all the data is preloaded. If I require only the 10 year range and I import like so

import moment from "moment-timezone/builds/moment-timezone-with-data-10-year-range"

I get only the data I want but no typings. Likewise if I import only the library with no data, I get no typings

import moment from 'moment-timezone/moment-timezone

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions