MCPcopy Create free account
hub / github.com/coder/guts / Array

Method Array

bindings/bindings.go:327–343  ·  view source on GitHub ↗
(arrType ExpressionType)

Source from the content-addressed store, hash-verified

325}
326
327func (b *Bindings) Array(arrType ExpressionType) (*goja.Object, error) {
328 array, err := b.f("arrayType")
329 if err != nil {
330 return nil, err
331 }
332
333 siObj, err := b.ToTypescriptNode(arrType)
334 if err != nil {
335 return nil, fmt.Errorf("array type: %w", err)
336 }
337
338 res, err := array(goja.Undefined(), siObj)
339 if err != nil {
340 return nil, xerrors.Errorf("call arrayType: %w", err)
341 }
342 return res.ToObject(b.vm), nil
343}
344
345func (b *Bindings) Tuple(length int, tupleType ExpressionType) (*goja.Object, error) {
346 tuple, err := b.f("homogeneousTupleType")

Callers 1

Calls 2

fMethod · 0.95
ToTypescriptNodeMethod · 0.95

Tested by

no test coverage detected