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

Method SerializeToTypescript

bindings/bindings.go:11–23  ·  view source on GitHub ↗
(node *goja.Object)

Source from the content-addressed store, hash-verified

9)
10
11func (b *Bindings) SerializeToTypescript(node *goja.Object) (string, error) {
12 toTypeScriptF, err := b.f("toTypescript")
13 if err != nil {
14 return "", err
15 }
16
17 res, err := toTypeScriptF(goja.Undefined(), node)
18 if err != nil {
19 return "", xerrors.Errorf("call printNode: %w", err)
20 }
21
22 return res.String(), nil
23}
24
25func (b *Bindings) ToTypescriptNode(ety Node) (*goja.Object, error) {
26 var siObj *goja.Object

Callers 4

SerializeInOrderMethod · 0.80
roundTripFunction · 0.80
TestImportDeclarationFunction · 0.80
TestSyntheticCommentsFunction · 0.80

Calls 2

fMethod · 0.95
StringMethod · 0.45

Tested by 3

roundTripFunction · 0.64
TestImportDeclarationFunction · 0.64
TestSyntheticCommentsFunction · 0.64