============================================================================= PROPERTY API METHODS ============================================================================= Property adds a data property to the class instance - changed to use pointer Default flags: writable, enumerable, configura
(name string, value *Value, flags ...int)
| 223 | // SCHEME C: Instance properties will be bound during instance creation |
| 224 | // Deprecated: Use PropertyValue or PropertyLiteral for declarative, reusable class definitions. |
| 225 | func (cb *ClassBuilder) Property(name string, value *Value, flags ...int) *ClassBuilder { |
| 226 | var spec ValueSpec |
| 227 | if value != nil { |
| 228 | spec = contextValueSpec{value: value} |
| 229 | } |
| 230 | return cb.PropertyValue(name, spec, flags...) |
| 231 | } |
| 232 | |
| 233 | // PropertyValue adds a data property spec to the class instance. |
| 234 | func (cb *ClassBuilder) PropertyValue(name string, spec ValueSpec, flags ...int) *ClassBuilder { |