You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The TypeScript definitions are broken because of the food.json import. Food is the only function that imports the json not just for the actual function but for the type definition of CuisineOrigin.
Create a new Angular 13 project with Angular CLI
Install falso
Import and use any of the rand* function
Start the project with npm start
The error below is thrown.
Please provide a link to a minimal reproduction of the bug
Error: node_modules/@ngneat/falso/lib/food.d.ts:2:22 - error TS2732:
Cannot find module './food.json'. Consider using '--resolveJsonModule' to import module with '.json' extension.
import { data } from './food.json';
~~~~~~~~~~~~~
Please provide the environment you discovered this bug in
Is this a regression?
Yes
Description
The TypeScript definitions are broken because of the food.json import. Food is the only function that imports the json not just for the actual function but for the type definition of
CuisineOrigin
.npm start
The error below is thrown.
Please provide a link to a minimal reproduction of the bug
https://github.com/rothsandro/falso-typescript
Please provide the exception or error you saw
Please provide the environment you discovered this bug in
Anything else?
Workaround: set
skipLibCheck
in tsconfig tofalse
Do you want to create a pull request?
No
The text was updated successfully, but these errors were encountered: