Options
All
  • Public
  • Public/Protected
  • All
Menu

Analyzes a script (string or file) for automatic library inclusion. An instance of this class is used to analyze a single script. It is immutable: instantiate a new instance if the file changes.

Analysis is cached in an lru-cache.

Hierarchy

  • Script

Implements

  • ScriptAnalysis

Index

Methods

Static fromFile

  • fromFile(filePath: string): Script

Static fromSource

  • fromSource(source: string, filePath?: string): Script

Static getAssociatedFiles

  • getAssociatedFiles(file: string): string[]

findMatchingComments

  • findMatchingComments(pattern: RegExp): readonly string[]

getAssociatedFiles

  • getAssociatedFiles(): string[]

getErrors

  • getErrors(): SyntaxError[]

Accessors

Static options

  • set options(__namedParameters: { cacheSize?: number }): void
  • Parameters

    • __namedParameters: { cacheSize?: number }
      • Optional cacheSize?: number

    Returns void

defs

  • get defs(): ReadonlyMap<string, DefinitionType>
  • Returns ReadonlyMap<string, DefinitionType>

loadCallArguments

  • get loadCallArguments(): ReadonlySet<string>
  • Returns ReadonlySet<string>

p5propRefs

  • get p5propRefs(): ReadonlySet<string>
  • Returns ReadonlySet<string>

refs

  • get refs(): ReadonlySet<string>

Constructors

constructor

  • new Script(source: string, filename?: string): Script

Properties

Optional Readonly filename

filename?: string

Readonly source

source: string

Generated using TypeDoc