MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / getWaveEventDataTSType

Function getWaveEventDataTSType

pkg/tsgen/tsgenevent.go:46–59  ·  view source on GitHub ↗
(eventName string, tsTypesMap map[reflect.Type]string)

Source from the content-addressed store, hash-verified

44}
45
46func getWaveEventDataTSType(eventName string, tsTypesMap map[reflect.Type]string) string {
47 rtype, found := WaveEventDataTypes[eventName]
48 if !found {
49 return "any"
50 }
51 if rtype == nil {
52 return "null"
53 }
54 tsType, _ := TypeToTSType(rtype, tsTypesMap)
55 if tsType == "" {
56 return "any"
57 }
58 return tsType
59}
60
61func GenerateWaveEventTypes(tsTypesMap map[reflect.Type]string) string {
62 for _, rtype := range WaveEventDataTypes {

Callers 2

GenerateWaveEventTypesFunction · 0.85

Calls 1

TypeToTSTypeFunction · 0.85

Tested by 1