Open stkrzysiak opened 2 years ago
PR up, not sure why it didn't link up, build failing but vercel gives me a 404. #256
Hi! TypeScript TSC gives me TS2305: Module '"@vvo/tzdb"' has no exported member 'abbreviations'.
Is there a reason for the abbreviations to not be in index.d.ts
? Or more precisely do we know why #256 is failing?
I forgot about this issue entirely, can you provide me steps to reproduce what you're seeing @BenceSzalai
In my setup simply making a new TypeScript file anywhere with the following triggers the issue:
import { abbreviations } from '@vvo/tzdb'
Right now my workaround is to add a definition manually before the import like this:
declare module '@vvo/tzdb' {
export const abbreviations: Record<string, string>
}
When running node version 14.x the lack of typescript definition causes an error, but this doesn't happen in node v16.x. Not sure exactly why but will PR the fix.
index.js: