{"modulePath":"github.com/wavetermdev/waveterm","version":"v0.14.5","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package tsgen\n\n## Variables\n\n```go\nvar ExtraTypes = []any{\n\twaveobj.ORef{},\n\t(*waveobj.WaveObj)(nil),\n\tmap[string]any{},\n\tservice.WebCallType{},\n\tservice.WebReturnType{},\n\twaveobj.UIContext{},\n\teventbus.WSEventType{},\n\twps.WSFileEventData{},\n\twaveobj.LayoutActionData{},\n\tfilestore.WaveFile{},\n\twconfig.FullConfigType{},\n\twconfig.WatcherUpdate{},\n\twshutil.RpcMessage{},\n\twshrpc.WshServerCommandMeta{},\n\tuserinput.UserInputRequest{},\n\tvdom.VDomCreateContext{},\n\tvdom.VDomElem{},\n\tvdom.VDomFunc{},\n\tvdom.VDomRef{},\n\tvdom.VDomBinding{},\n\tvdom.VDomFrontendUpdate{},\n\tvdom.VDomBackendUpdate{},\n\twaveobj.MetaTSType{},\n\twaveobj.ObjRTInfo{},\n\tuctypes.RateLimitInfo{},\n\twconfig.AIModeConfigUpdate{},\n\twshrpc.BlockJobStatusData{},\n}\n```\nadd extra types to generate here\n\n```go\nvar TypeUnions = []tsgenmeta.TypeUnionMeta{\n\twebcmd.WSCommandTypeUnionMeta(),\n}\n```\nadd extra type unions to generate here\n\n```go\nvar WaveEventDataTypes = map[string]reflect.Type{\n\twps.Event_BlockClose:          reflect.TypeOf(\"\"),\n\twps.Event_ConnChange:          reflect.TypeOf(wshrpc.ConnStatus{}),\n\twps.Event_SysInfo:             reflect.TypeOf(wshrpc.TimeSeriesData{}),\n\twps.Event_ControllerStatus:    reflect.TypeOf((*blockcontroller.BlockControllerRuntimeStatus)(nil)),\n\twps.Event_BuilderStatus:       reflect.TypeOf(wshrpc.BuilderStatusData{}),\n\twps.Event_BuilderOutput:       reflect.TypeOf(map[string]any{}),\n\twps.Event_WaveObjUpdate:       reflect.TypeOf(waveobj.WaveObjUpdate{}),\n\twps.Event_BlockFile:           reflect.TypeOf((*wps.WSFileEventData)(nil)),\n\twps.Event_Config:              reflect.TypeOf(wconfig.WatcherUpdate{}),\n\twps.Event_UserInput:           reflect.TypeOf((*userinput.UserInputRequest)(nil)),\n\twps.Event_RouteDown:           nil,\n\twps.Event_RouteUp:             nil,\n\twps.Event_WorkspaceUpdate:     nil,\n\twps.Event_WaveAIRateLimit:     reflect.TypeOf((*uctypes.RateLimitInfo)(nil)),\n\twps.Event_WaveAppAppGoUpdated: nil,\n\twps.Event_TsunamiUpdateMeta:   reflect.TypeOf(wshrpc.AppMeta{}),\n\twps.Event_AIModeConfig:        reflect.TypeOf(wconfig.AIModeConfigUpdate{}),\n\twps.Event_BlockJobStatus:      reflect.TypeOf(wshrpc.BlockJobStatusData{}),\n\twps.Event_Badge:               reflect.TypeOf(baseds.BadgeEvent{}),\n}\n```\n\n## Functions\n\n```go\nfunc GenerateMethodBody(serviceName string, method reflect.Method, meta tsgenmeta.MethodMeta) string\n```\n\n```go\nfunc GenerateMethodSignature(serviceName string, method reflect.Method, meta tsgenmeta.MethodMeta, isFirst bool, tsTypesMap map[reflect.Type]string) string\n```\n\n```go\nfunc GenerateServiceClass(serviceName string, serviceObj any, tsTypesMap map[reflect.Type]string) string\n```\n\n```go\nfunc GenerateServiceTypes(tsTypesMap map[reflect.Type]string) error\n```\n\n```go\nfunc GenerateTSType(rtype reflect.Type, tsTypesMap map[reflect.Type]string)\n```\n\n```go\nfunc GenerateTSTypeUnion(unionMeta tsgenmeta.TypeUnionMeta, tsTypeMap map[reflect.Type]string)\n```\n\n```go\nfunc GenerateWaveEventTypes(tsTypesMap map[reflect.Type]string) string\n```\n\n```go\nfunc GenerateWaveObjTSType() string\n```\n\n```go\nfunc GenerateWaveObjTypes(tsTypesMap map[reflect.Type]string)\n```\n\n```go\nfunc GenerateWshClientApiMethod(methodDecl *wshrpc.WshRpcMethodDecl, tsTypesMap map[reflect.Type]string) string\n```\n\n```go\nfunc GenerateWshServerTypes(tsTypesMap map[reflect.Type]string) error\n```\n\n```go\nfunc TypeToTSType(t reflect.Type, tsTypesMap map[reflect.Type]string) (string, []reflect.Type)\n```\n\n","path":"github.com/wavetermdev/waveterm/pkg/tsgen","name":"tsgen","synopsis":"","isRedistributable":true}
