I want to write a CustomTransformers for my webpack loader config.
Babel's visitors have API about scope
If I get a path of ImportDeclaration import * as React from "react", I can using path.scope.getBinding('React').referencePaths to get all reference paths using React.
Is there any API in TypeScript to get identifier's scope or referenced nodes/identifiers?
Also, Is there any API in TypeScript to get ImportDeclaration's moduleSpecifier's resolved source file? for example import * as React from "react"'s resolved source file is /home/me/my-ts-project/node_modules/react/cjs/react.development.js
I want to write a CustomTransformers for my webpack loader config.
Babel's visitors have API about scope
If I get a path of ImportDeclaration
import * as React from "react", I can usingpath.scope.getBinding('React').referencePathsto get all reference paths using React.Is there any API in TypeScript to get identifier's scope or referenced nodes/identifiers?
Also, Is there any API in TypeScript to get ImportDeclaration's moduleSpecifier's resolved source file? for example
import * as React from "react"'s resolved source file is/home/me/my-ts-project/node_modules/react/cjs/react.development.js