MCPcopy Create free account
hub / github.com/devld/go-drive / Call

Method Call

script/utils.go:208–218  ·  view source on GitHub ↗
(thisValue any, args ...any)

Source from the content-addressed store, hash-verified

206}
207
208func (v *Value) Call(thisValue any, args ...any) *Value {
209 thisV, e := v.vm.o.ToValue(thisValue)
210 if e != nil {
211 v.vm.ThrowTypeError(e.Error())
212 }
213 rv, e := v.v.Call(thisV, args...)
214 if e != nil {
215 v.vm.ThrowTypeError(e.Error())
216 }
217 return newValue(v.vm, rv)
218}
219
220func parseValue(ov *Value, v reflect.Value) {
221 if ov == nil || !v.IsValid() {

Callers

nothing calls this directly

Calls 3

newValueFunction · 0.85
ThrowTypeErrorMethod · 0.80
ErrorMethod · 0.65

Tested by

no test coverage detected