Home Reference Source Repository
import {SwitchCase} from 'esast/src/ast.js'
public class | source

SwitchCase

Extends:

NodeStatement → SwitchCase

A single case within a SwitchStatement. If test is null, this is the default case.

Constructor Summary

Public Constructor
public

constructor(test: *, consequent: *)

Member Summary

Public Members
public
public

Inherited Summary

From class Node
public get

type: *

For compatibility with other AST representations, all Node instances have a 'type' property that is the name of that type.
public

toJSON(): *

Convert to JSON.
public

toString(): *

Public Constructors

public constructor(test: *, consequent: *) source

Params:

NameTypeAttributeDescription
test *
consequent *

Public Members

public consequent: * source

public test: Expression source