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:
LCETypeand 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
parseTypeandparseAnonymousTypefunctions contain the central extraction logic parseESNodeTypeand other exportedparseXfunctions serve as shortcuts to extract type information for specific syntax constructs
- internally, the