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

Method Tuple

bindings/bindings.go:345–361  ·  view source on GitHub ↗
(length int, tupleType ExpressionType)

Source from the content-addressed store, hash-verified

343}
344
345func (b *Bindings) Tuple(length int, tupleType ExpressionType) (*goja.Object, error) {
346 tuple, err := b.f("homogeneousTupleType")
347 if err != nil {
348 return nil, err
349 }
350
351 siObj, err := b.ToTypescriptNode(tupleType)
352 if err != nil {
353 return nil, fmt.Errorf("array type: %w", err)
354 }
355
356 res, err := tuple(goja.Undefined(), b.vm.ToValue(length), siObj)
357 if err != nil {
358 return nil, xerrors.Errorf("call arrayType: %w", err)
359 }
360 return res.ToObject(b.vm), nil
361}
362
363func (b *Bindings) Alias(alias *Alias) (*goja.Object, error) {
364 aliasFunc, err := b.f("aliasDecl")

Callers 1

Calls 2

fMethod · 0.95
ToTypescriptNodeMethod · 0.95

Tested by

no test coverage detected