SourceFileRecord Module
Byte offsets into the `SourceFile` node's extended-data record. Unlike everything else here, this layout is not in `ast.json`. The record is written by a hand-written Go function and read by hand-written TypeScript, so the only statement of its shape is the format documentation in `encoder.go`, which the generator parses. Every field is a `uint32`; `Ast` in `Library.fs` is what gives them meaning.
Functions and values
| Function or value |
Description
|
Full Usage:
SourceFileRecord.Absent
Returns: uint32
|
The value a structured-data offset or string index carries when the field is absent.
|
Full Usage:
SourceFileRecord.AmbientModuleNames
Returns: int<MeasureProduct<byteOffset, MeasureOne>>
|
Byte offset of `ambientModuleNames` string array.
|
Full Usage:
SourceFileRecord.CanonicalSourceFileName
Returns: int<MeasureProduct<byteOffset, MeasureOne>>
|
Index of `canonicalSourceFileName`, or noStructuredData.
|
|
Index of `contentMapper`, or noStructuredData.
|
Full Usage:
SourceFileRecord.DiagnosticDirectives
Returns: int<MeasureProduct<byteOffset, MeasureOne>>
|
Byte offset of `diagnosticDirectives` in structured data.
|
Full Usage:
SourceFileRecord.ExternalModuleIndicator
Returns: int<MeasureProduct<byteOffset, MeasureOne>>
|
Node index of `externalModuleIndicator` (0 = nil).
|
|
Index of `fileName` in the string offsets section.
|
|
Byte offset of `imports` node index array in structured data.
|
|
Value of `languageVariant`.
|
Full Usage:
SourceFileRecord.LibReferenceDirectives
Returns: int<MeasureProduct<byteOffset, MeasureOne>>
|
Byte offset of `libReferenceDirectives` in structured data.
|
Full Usage:
SourceFileRecord.ModuleAugmentations
Returns: int<MeasureProduct<byteOffset, MeasureOne>>
|
Byte offset of `moduleAugmentations` node index array.
|
|
Index of `originalText` in the string offsets section.
|
|
Index of `path` in the string offsets section.
|
|
Byte offset of `referencedFiles` in structured data section.
|
|
Value of `scriptKind`.
|
Full Usage:
SourceFileRecord.Size
Returns: int
|
The record's total size in bytes.
|
|
Byte offset of `spanMap` in structured data.
|
Full Usage:
SourceFileRecord.SupplementalSourceFileNames
Returns: int<MeasureProduct<byteOffset, MeasureOne>>
|
Byte offset of `supplementalSourceFileNames` in structured data.
|
|
Index of `text` in the string offsets section.
|
Full Usage:
SourceFileRecord.TypeReferenceDirectives
Returns: int<MeasureProduct<byteOffset, MeasureOne>>
|
Byte offset of `typeReferenceDirectives` in structured data.
|
|
Index of `virtualFileName`, or noStructuredData.
|