Reputation: 1025
I am getting the following Typescript error in a React application when attempting to import untyped JS functions:
Variable 'initialiseConfig' implicitly has type 'any' in some locations where its type cannot be determined. TS7034
Is there a way to prevent TS getting upset about certain imported, untyped JS?
Upvotes: 0
Views: 422
Reputation: 575
You can use the require
statement instead of import ... from
when importing libraries that doesn't have type declaration.
Upvotes: 0