Result References 
The return value of TwoSlash contains the following information:
export interface TwoSlashReturn {
  /** The output code, could be TypeScript, but could also be a JS/JSON/d.ts */
  code: string
  /** Nodes containing various bits of information about the code */
  nodes: TwoSlashNode[]
  /** The meta information the twoslash run */
  meta: TwoSlashReturnMeta
  /** Getters shorthand */
  get queries(): NodeQuery[]
  get completions(): NodeCompletion[]
  get errors(): NodeError[]
  get highlights(): NodeHighlight[]
  get hovers(): NodeHover[]
  get tags(): NodeTag[]
}import type { NodeCompletion, NodeError, NodeHighlight, NodeHover, NodeQuery, NodeTag, TwoSlashNode, TwoSlashReturnMeta } from 'twoslash'
// ---cut---
export interface TwoSlashReturn {
  /** The output code, could be TypeScript, but could also be a JS/JSON/d.ts */
  code: string
  /** Nodes containing various bits of information about the code */
  nodes: TwoSlashNode[]
  /** The meta information the twoslash run */
  meta: TwoSlashReturnMeta
  /** Getters shorthand */
  get queries(): NodeQuery[]
  get completions(): NodeCompletion[]
  get errors(): NodeError[]
  get highlights(): NodeHighlight[]
  get hovers(): NodeHover[]
  get tags(): NodeTag[]
}Check the type definition for all the fields.
Information Nodes 
TwoSlash returns all types of information in the nodes array. Check the type definition for all the fields.
Properties 
Nodes provide the following common properties:
type: the type of the node. Can behover,query,error,tag,highlightorcompletion- was 
kindin@typescript/twoslashfor some entries 
- was 
 start: the 0-indexed start position of the node in the output codeline: a 0-indexed line number of the node in the output codecharacter: a 0-indexed character number of the node in the output code- was 
offsetin@typescript/twoslashfor some entries 
- was 
 length: length of the node
For different types of nodes, they have some extra properties:
Type hover 
text: the text of the hover, usually the type information of the given nodedocs: the jsdoc of the given node, can beundefined
Type query 
Same as hover
Type highlight 
text: the extra annotation text of the highlight, can beundefined
Type completion 
completion: the completion entriescompletionPrefix: the prefix of the completion
Type error 
text: the error message- was 
renderedMessagein@typescript/twoslash 
- was 
 level: the error level- was 
categoryin@typescript/twoslash 
- was 
 code: TypeScript error codeid: a generated based on the code and position of the error
Type tag 
text: the text of the tag- was 
annotationin@typescript/twoslash 
- was 
 
Getters 
To make it easier to access, we also provide some getters shortcuts to each type of the nodes:
import type { NodeCompletion, NodeError, NodeHighlight, NodeHover, NodeQuery, NodeTag, TwoSlashNode, TwoSlashReturnMeta } from 'twoslash'
// ---cut---
export interface TwoSlashReturn {
  nodes: TwoSlashNode[]
  get hovers(): NodeHover[] // was `staticQuickInfos`
  get queries(): NodeQuery[] // was `queries` with `kind: 'query'`
  get completions(): NodeCompletion[] // was `queries` with `kind: 'completion'`
  get errors(): NodeError[]
  get highlights(): NodeHighlight[]
  get tags(): NodeTag[]
  // ....
}Meta Information 
An additional meta property is returned providing additional information about the result. Check the type definition for all the fields.
meta.flagNotations 
The list of options flag notation that is detected from the code.
meta.removals 
A list of the index ranges of the code removed by TwoSlash from the original code, useful for better source mapping.
meta.compilerOptions 
The final resolved compilerOptions
meta.handbookOptions 
The final resolved handbookOptions