MCPcopy Create free account
hub / github.com/buke/quickjs-go / Property

Method Property

class.go:225–231  ·  view source on GitHub ↗

============================================================================= 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)

Source from the content-addressed store, hash-verified

223// SCHEME C: Instance properties will be bound during instance creation
224// Deprecated: Use PropertyValue or PropertyLiteral for declarative, reusable class definitions.
225func (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.
234func (cb *ClassBuilder) PropertyValue(name string, spec ValueSpec, flags ...int) *ClassBuilder {

Callers 4

createPointClassFunction · 0.80
TestErrorHandlingFunction · 0.80

Calls 1

PropertyValueMethod · 0.95

Tested by 4

createPointClassFunction · 0.64
TestErrorHandlingFunction · 0.64