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

Method PropertySignature

bindings/bindings.go:201–223  ·  view source on GitHub ↗
(sig *PropertySignature)

Source from the content-addressed store, hash-verified

199}
200
201func (b *Bindings) PropertySignature(sig *PropertySignature) (*goja.Object, error) {
202 propertySignature, err := b.f("propertySignature")
203 if err != nil {
204 return nil, err
205 }
206
207 siObj, err := b.ToTypescriptNode(sig.Type)
208 if err != nil {
209 return nil, fmt.Errorf("property field type: %w", err)
210 }
211
212 res, err := propertySignature(goja.Undefined(),
213 b.vm.ToValue(ToStrings(sig.Modifiers)),
214 b.vm.ToValue(sig.Name),
215 b.vm.ToValue(sig.QuestionToken),
216 siObj,
217 )
218 if err != nil {
219 return nil, xerrors.Errorf("call propertySignature: %w", err)
220 }
221
222 return res.ToObject(b.vm), nil
223}
224
225func (b *Bindings) LiteralKeyword(word *LiteralKeyword) (*goja.Object, error) {
226 literalKeyword, err := b.f("literalKeyword")

Callers 1

ToTypescriptNodeMethod · 0.95

Calls 4

fMethod · 0.95
ToTypescriptNodeMethod · 0.95
propertySignatureFunction · 0.85
ToStringsFunction · 0.85

Tested by

no test coverage detected