ttag-org / ttag

:orange_book: simple approach for javascript localization
https://ttag.js.org/
MIT License
337 stars 40 forks source link

Add index.d.ts to root level dir to support typescript auto-import #238

Closed sentilesdal closed 6 months ago

sentilesdal commented 2 years ago

Currently the index.d.ts file lives in the types/ directory. Auto-import for IDEs will then try to import ttag function from 'ttag/types'. When building this package for npm, the types file should be copied to be a sibling of the main index.js file.

piecyk commented 1 year ago

Yes, let's fix it, having import { t } from 'ttag/types' as auto import is bad

AlexMost commented 6 months ago

done in 1.8.6 :heavy_check_mark: