Skip to content
1 min read · 206 words

batteries/artifacts/ecmascript

Remarks

Parse source code via the TypeScript compiler API to enable structural queries:

  • artifact_es_symbols — top-level declarations (functions, classes, interfaces, types)
  • artifact_es_imports — import declarations and their source modules
  • artifact_es_exports — export declarations and re-exports
  • artifact_es_outline — nested member index (class methods/properties, interface members)
  • artifact_es_signature — declaration signature text (parameters, return types)
  • artifact_es_jsdoc — JSDoc comments attached to declarations
  • artifact_es_references — syntactic scan for identifier usage (not semantic)

Decoding note: decode() on a SpooledEcmaScriptArtifact throws until registerArtifactEncodables() has run. encode() requires no setup.

Classes

ClassDescription
SpooledEcmaScriptArtifactA @nhtio/adk!SpooledArtifact specialisation for EcmaScript (JavaScript and TypeScript) source files.

Interfaces

InterfaceDescription
EcmaScriptExportAn export declaration or re-export.
EcmaScriptImportAn import declaration.
EcmaScriptSymbolA top-level declaration (function, class, interface, type alias, enum, or binding).
IdentifierReferenceThe location of an identifier reference.
OutlineEntryAn entry in the structural outline (class or interface with its members).
OutlineMemberA class or interface member in the outline.

References

E_TYPESCRIPT_PEER_MISSING

Re-exports E_TYPESCRIPT_PEER_MISSING