Class: Typesmith::ArrayProperty
Constant Summary
Constants inherited
from BaseProperty
BaseProperty::PRIMITIVE_TYPES
Instance Attribute Summary
#type
Attributes inherited from BaseProperty
#name, #optional
Instance Method Summary
collapse
#initialize
#initialize
Instance Method Details
#process_value(value) ⇒ Object
9
10
11
|
# File 'lib/typesmith/array_property.rb', line 9
def process_value(value)
value.map { |v| super(v) }
end
|
#to_typescript ⇒ Object
5
6
7
|
# File 'lib/typesmith/array_property.rb', line 5
def to_typescript
"#{camelized_name}#{optional_suffix}: #{get_type_string(type)}[];"
end
|