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

Property

Extends:

Node → Property

Part of an ObjectExpression. If kind is 'get' or 'set', then value should be a FunctionExpression.

Constructor Summary

Public Constructor
public

constructor(kind: *, key: *, value: *, method: *, shorthand: *, computed: *)

Member Summary

Public Members
public
public

key: Literal | Identifier

public
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(kind: *, key: *, value: *, method: *, shorthand: *, computed: *) source

Params:

NameTypeAttributeDescription
kind *
key *
value *
method *
shorthand *
computed *

Public Members

public computed: boolean source

public key: Literal | Identifier source

public kind: PropertyKind source

public method: boolean source

public value: Expression source