New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typescript - Support const
modifier for options
and key
#2007
Conversation
Hey @adrai, in order to support users with typescript 5+ and older versions, I had to place the types in different files, and now we have two versions of the types for |
included in 23.4.0 |
@pedrodurek @adrai Facing below issues while building with "tsc" after this PR got approved. 2 import type { $Dictionary } from 'typescript/helpers'; node_modules/i18next/index.d.ts:14:8 - error TS2307: Cannot find module 'typescript/options' or its corresponding type declarations. 14 } from 'typescript/options'; node_modules/i18next/index.d.ts:16:43 - error TS2307: Cannot find module 'typescript/t' or its corresponding type declarations. 16 import type { KeyPrefix, TFunction } from 'typescript/t'; node_modules/i18next/index.d.ts:497:1 - error TS1383: Only named exports may use 'export type'. 497 export type * from 'typescript/options'; node_modules/i18next/index.d.ts:497:20 - error TS2307: Cannot find module 'typescript/options' or its corresponding type declarations. 497 export type * from 'typescript/options'; node_modules/i18next/index.d.ts:498:1 - error TS1383: Only named exports may use 'export type'. 498 export type * from 'typescript/t'; node_modules/i18next/index.d.ts:498:20 - error TS2307: Cannot find module 'typescript/t' or its corresponding type declarations. 498 export type * from 'typescript/t'; |
@efstathiosntonas @abhi-works sorry, please try with v23.4.1 |
@adrai thanks, it works as a charm now. |
Closes #1929, #1950
Checklist
npm run test
Checklist (for documentation change)