MCPcopy Create free account
hub / github.com/wailsapp/wails / Add

Method Add

v2/internal/typescriptify/typescriptify.go:256–268  ·  view source on GitHub ↗
(obj interface{})

Source from the content-addressed store, hash-verified

254}
255
256func (t *TypeScriptify) Add(obj interface{}) *TypeScriptify {
257 switch ty := obj.(type) {
258 case StructType:
259 t.structTypes = append(t.structTypes, ty)
260 case *StructType:
261 t.structTypes = append(t.structTypes, *ty)
262 case reflect.Type:
263 t.AddType(ty)
264 default:
265 t.AddType(reflect.TypeOf(obj))
266 }
267 return t
268}
269
270func (t *TypeScriptify) AddType(typeOf reflect.Type) *TypeScriptify {
271 t.structTypes = append(t.structTypes, StructType{Type: typeOf})

Callers

nothing calls this directly

Calls 1

AddTypeMethod · 0.95

Tested by

no test coverage detected