Class: JsxRosetta::IR::Prop

Inherits:
Data
  • Object
show all
Includes:
Node
Defined in:
lib/jsx_rosetta/ir/types.rb

Overview

A component prop, possibly with a default value.

name : String — the prop name on the parent (e.g. “data-testid”). default : Interpolation | nil alias_name : String | nil — the local binding name inside the body when

the destructure renames it (`"data-testid": dataTestId`).
Use sites of the alias resolve to the prop's ivar.

Instance Attribute Summary collapse

Instance Attribute Details

#alias_nameObject (readonly)

Returns the value of attribute alias_name

Returns:

  • (Object)

    the current value of alias_name



118
119
120
# File 'lib/jsx_rosetta/ir/types.rb', line 118

def alias_name
  @alias_name
end

#defaultObject (readonly)

Returns the value of attribute default

Returns:

  • (Object)

    the current value of default



118
119
120
# File 'lib/jsx_rosetta/ir/types.rb', line 118

def default
  @default
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



118
119
120
# File 'lib/jsx_rosetta/ir/types.rb', line 118

def name
  @name
end