Skip to content

Class: AsPattern ​

Represents an alias pattern (e.g., x@pat), binding the whole value to a name while matching inner patterns.

Example ​

ts
f p@(x, y) = ...

Constructors ​

Constructor ​

new AsPattern(alias, pattern, loc?): AsPattern

Parameters ​

ParameterType
aliasVariablePattern | WildcardPattern
patternPattern
loc?SourceLocation

Returns ​

AsPattern

Overrides ​

ASTNode.constructor