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

Method StaticProperty

class.go:257–263  ·  view source on GitHub ↗

StaticProperty adds a data property to the class constructor - changed to use pointer Default flags: writable, enumerable, configurable Deprecated: Use StaticPropertyValue or StaticPropertyLiteral for declarative, reusable class definitions.

(name string, value *Value, flags ...int)

Source from the content-addressed store, hash-verified

255// Default flags: writable, enumerable, configurable
256// Deprecated: Use StaticPropertyValue or StaticPropertyLiteral for declarative, reusable class definitions.
257func (cb *ClassBuilder) StaticProperty(name string, value *Value, flags ...int) *ClassBuilder {
258 var spec ValueSpec
259 if value != nil {
260 spec = contextValueSpec{value: value}
261 }
262 return cb.StaticPropertyValue(name, spec, flags...)
263}
264
265// StaticPropertyValue adds a data property spec to the class constructor.
266func (cb *ClassBuilder) StaticPropertyValue(name string, spec ValueSpec, flags ...int) *ClassBuilder {

Callers 2

createPointClassFunction · 0.80

Calls 1

StaticPropertyValueMethod · 0.95

Tested by 2

createPointClassFunction · 0.64