Skip to content
This repository has been archived by the owner on Feb 21, 2019. It is now read-only.

Example repo related to question about Typescript compiler API

Notifications You must be signed in to change notification settings

cylon3035/ts-compiler-api-question

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ts-compiler-api-question

Example repo related to question about Typescript compiler API

Question

Language Service provides API to findReferences, result type is ReferencedSymbol[], I can get fileName and TextSpan of the reference (see file ./src/script.ts:38:13). Can I get the ts.Node of the reference without AST traversal?

How to start?

Before start please install dependencies with yarn or npm install

$ yarn ts-node ./src/script.ts ./src/example.ts

Or use vscode debugger with task configuration

 {
    "name": "DEBUG",
    "type": "node",
    "request": "launch",
    "args": ["./src/script.ts","./src/example.ts"],
    "runtimeArgs": ["--nolazy", "-r","ts-node/register"],
    "sourceMaps": true,
    "cwd": "${workspaceRoot}",
    "protocol": "inspector"
}

About

Example repo related to question about Typescript compiler API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published