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

  • fromFile(filePath: string): Script
  • fromSource(source: string, filePath?: string): Script
  • getAssociatedFiles(file: string): string[]
  • findMatchingComments(pattern: RegExp): readonly string[]
  • getAssociatedFiles(): string[]
  • getErrors(): SyntaxError[]

Accessors

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

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

    Returns void

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

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

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

  • get refs(): ReadonlySet<string>

Constructors

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

Properties

filename?: string
source: string

Generated using TypeDoc