Closed benj-dobs closed 2 years ago
I'll take a look at this too. I might try to make a PR upstream to rollup-plugin-dts that allows it to parse json files if resolveJsonModules
is set to true. It wouldn't be a very invasive change but I'm unsure if it would be accepted since it's not recommended:
Working with .ts(x) or even .js(x) (when setting allowJs: true) does work, but is not recommended.
Superseded by #40 - I don't think there's anything we need to keep from this PR.
Resolves https://github.com/manuelmhtr/countries-and-timezones/issues/38.
This is technically a breaking change, because:
CountryCode
andTimezoneName
typesgetCountry('GB')
would previously returnCountry
, but this has expanded toCountry | null
, which will require additional handlingIdeally, we wouldn't remove the JSON import at all, but I can't find a way to get it to work nicely with Rollup. We should discuss this further before merging this, I think.
@kherock @manuelmhtr