Skip to content

feat: track target nodes with TypeScript AST #44

@MengLinMaker

Description

@MengLinMaker

Useful tool for exploring TypeScript AST:

TS AST viewer for this example:

const _Cache = Cache
const cache = new _Cache()
cache.add("test.html")

const keys = cache.keys()
const _keys =  new Cache().keys()
_keys.then((request) =>{
    const len = request.length
})

Types to infer

Instance

VariableDeclaration + PropertyAccessExpression:

  • Example: const cache = new Cache()
  • Type: Cache

Method

PropertyAccessExpression:

  • Example: cache.add("test.html")
  • Type: { (request: RequestInfo | URL): Promise<void>; (request: RequestInfo | URL): Promise<void>; }
  • Note: Type can be complex

Types to ignore

Class

NewExpression + VariableDeclaration:

  • Example: const _Cache = Cache
  • Type: { new (): Cache; prototype: Cache; }
  • Note: Type can be complex

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions