Open sebastien-abbal opened 9 months ago
my solution:
creat file i18n.d.ts
in folder @type
import { LinkProps } from 'next/link'
declare module 'next-export-i18n' {
export function useLanguageSwitcherIsActive(): { isActive: boolean }
export function useTranslation(): { t: (key: string) => string }
export function useSelectedLanguage(): {
lang: string
setLang: (key: 'en' | 'vi') => void
}
export function LanguageSwitcher(props: {
lang: string
children?: ReactNode
}): React.ReactElement
export function LinkWithLocale(
props: LinkProps & {
children: ReactNode
},
): React.ReactElement
}
Hello ! :)
I am importing the types from the module (for typescript), i have all any by default. And when i am going to the
node_modules/next-export-i18n
, i don't have any types accessible from theindex.d.ts
.But the module structure is:
So there is no
./hooks
folder or./components
folder available. Do you have any idea ? or i am doing something bad ?Regards,