Extraction Strategy: Types
Goal: Enrichment of the graph structures with type information in the form of :TS:Type nodes
Strategy:
- Use the ESLint Parser Services to get the native TS Compiler node for the AST node of a construct for which a type should be determined
- Use TS Compiler TypeChecker to extract all information necessary to construct the type concepts
Central Components:
LCEType
and all of it’s sub-classes: concepts that represent various type constructs that TypeScript offerstype.utils.ts
: collection of functions that utilize the TS Compiler API to extract type concepts- internally, the
parseType
andparseAnonymousType
functions contain the central extraction logic parseESNodeType
and other exportedparseX
functions serve as shortcuts to extract type information for specific syntax constructs
- internally, the