On this page

addUsage(state, symbol, usage): void
Attributes
parser state
symbol:null | TopLevelSymbol
the symbol, or null for all symbols
usage:Usage
usage data
Returns:void

Processes the provided state.


addVariableUsage(parser, name, usage): void
Attributes
the parser
name:string
name of variable
usage:Usage
usage data
Returns:void

Processes the provided parser.


bailout(parserState): void
Attributes
parserState:ParserState
parser state
Returns:void

Processes the provided parser state.


enable(parserState): void
Attributes
parserState:ParserState
parser state
Returns:void

Processes the provided parser state.


getDependencyUsedByExportsCondition(dependency, usedByExports, moduleGraph): null | false | ((moduleGraphConnection: ModuleGraphConnection, runtime: RuntimeSpec) => ConnectionState)
Attributes
dependency:Dependency
the dependency
usedByExports:undefined | boolean | Set<string>
usedByExports info
moduleGraph:ModuleGraph
moduleGraph
Returns:null | false | ((moduleGraphConnection: ModuleGraphConnection, runtime: RuntimeSpec) => ConnectionState)
function to determine if the connection is active

Usage callback map.


getTopLevelSymbol(state): void | TopLevelSymbol
Attributes
parser state
usage data

Returns usage data.


inferDependencyUsage(state): void
Attributes
parser state
Returns:void

Processes the provided state.


isDependencyUsedByExports(dependency, usedByExports, moduleGraph, runtime): boolean
Attributes
dependency:Dependency
the dependency
usedByExports:undefined | boolean | Set<string>
usedByExports info
moduleGraph:ModuleGraph
moduleGraph
runtime:RuntimeSpec
runtime
Returns:boolean
false, when unused. Otherwise true

Returns false, when unused. Otherwise true.


isEnabled(parserState): boolean
Attributes
parserState:ParserState
parser state
Returns:boolean
true, when enabled

Returns true, when enabled.


onUsage(state, onUsageCallback): void
Attributes
parser state
onUsageCallback:(value?: boolean | Set<string>) => void
on usage callback
Returns:void

Processes the provided state.


setTopLevelSymbol(state, symbol?): void
Attributes
parser state
the symbol
Returns:void

Processes the provided state.


tagTopLevelSymbol(parser, name): undefined | TopLevelSymbol
Attributes
parser
name:string
name of variable
symbol

Returns symbol.


Type:unique symbol

Type:string | true | TopLevelSymbol