Skip to content

Small package for parsing typescript (js and variants) using ts-morph for powering code graph

Notifications You must be signed in to change notification settings

codestoryai/typescript_parsing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Typescript Parsing

How to use this?

  • Run npm install all
  • Run ts-node -p package.json parseRepo.ts {name_of_your_file.ts} {directory_location} {name_of_your_file.ts}

Why do I need to repeat the file name 2 times?

We had a use-case where files could be moved between commits, to work around that issue we provide the name of the file twice if you change that, your symbols will be relative to the file which you mention here

What can I expect to get after running this?

Say you have 2 files:

alpha.ts
beta.ts

and the contents of alpha.ts is:

import B from 'beta'
export interface A {
    b: B
}

and the contents of beta.ts is:

export interface B {
    test: string
}

you should be able to see the symbols as:

`alpha.A` and `beta.B` and that `alpha.A` depends on `beta.B` 

About

Small package for parsing typescript (js and variants) using ts-morph for powering code graph

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published