disintegrator / next-with-lingui

A Next.js project that uses LinguiJS for internationalization
MIT License
27 stars 10 forks source link

TypeScript validity #2

Open cjayyy opened 5 years ago

cjayyy commented 5 years ago

When importing import getCatalog from "@catalogs"; in _app.tsx TSlint shouts "Cannot find module '@catalogs'."

Is there a way how to import catalogs more explicitly so there is no problem within checks?

revskill10 commented 5 years ago

@cJayyy You can try this in your typings/index.d.ts :

declare module "@catalogs" {
  const content: any;
  export default content;
}