(length int, tupleType ExpressionType)
| 343 | } |
| 344 | |
| 345 | func (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 | |
| 363 | func (b *Bindings) Alias(alias *Alias) (*goja.Object, error) { |
| 364 | aliasFunc, err := b.f("aliasDecl") |
no test coverage detected