typescript.scm 1.2 KB

123456789101112131415161718192021
  1. ; Seed query for the R1 scaffold — smoke-level coverage that proves the
  2. ; buffer contract and emitter mechanics end to end. NOT extraction parity:
  3. ; R2 replaces this with the full TypeScript/TSX port.
  4. ;
  5. ; Capture convention (see emitter.rs):
  6. ; @def.<NodeKind> — the declaration node; pairs with @name in the pattern
  7. ; @name — the declaration's name node
  8. ; @ref.<EdgeKind> — a reference; the capture's own text is the name
  9. (class_declaration name: (type_identifier) @name) @def.class
  10. (abstract_class_declaration name: (type_identifier) @name) @def.class
  11. (interface_declaration name: (type_identifier) @name) @def.interface
  12. (enum_declaration name: (identifier) @name) @def.enum
  13. (type_alias_declaration name: (type_identifier) @name) @def.type_alias
  14. (function_declaration name: (identifier) @name) @def.function
  15. (generator_function_declaration name: (identifier) @name) @def.function
  16. (method_definition name: (property_identifier) @name) @def.method
  17. (call_expression function: (identifier) @ref.calls)
  18. (call_expression function: (member_expression property: (property_identifier) @ref.calls))
  19. (new_expression constructor: (identifier) @ref.instantiates)