Closed
Description
yarn init --yes
yarn add @types/[email protected]
With noImplicitAny
:
import * as acorn from "acorn/dist/acorn_loose";
Error:
Could not find a declaration file for module 'acorn/dist/acorn_loose'. 'c:/Users/Daniel/sample/node_modules/acorn/dist/acorn_loose.js' implicitly has an 'any' type.
Try `npm install @types/acorn` if it exists or add a new declaration (.d.ts) file containing `declare module 'acorn';`
But @types/acorn
already has been installed. The true error is that the declaration files haven't been written for this deeper import. I think we can give a better error message here.