implement cmd:i, hook up telemetry switch, fix some settings types

This commit is contained in:
sawka
2024-09-02 20:21:35 -07:00
parent e3b7ab73c0
commit 70ef76be62
13 changed files with 100 additions and 52 deletions
+8 -3
View File
@@ -56,6 +56,7 @@ var contextRType = reflect.TypeOf((*context.Context)(nil)).Elem()
var errorRType = reflect.TypeOf((*error)(nil)).Elem()
var anyRType = reflect.TypeOf((*interface{})(nil)).Elem()
var metaRType = reflect.TypeOf((*waveobj.MetaMapType)(nil)).Elem()
var metaSettingsType = reflect.TypeOf((*wconfig.MetaSettingsType)(nil)).Elem()
var uiContextRType = reflect.TypeOf((*waveobj.UIContext)(nil)).Elem()
var waveObjRType = reflect.TypeOf((*waveobj.WaveObj)(nil)).Elem()
var updatesRtnRType = reflect.TypeOf(waveobj.UpdatesRtnType{})
@@ -160,9 +161,10 @@ func TypeToTSType(t reflect.Type, tsTypesMap map[reflect.Type]string) (string, [
}
var tsRenameMap = map[string]string{
"Window": "WaveWindow",
"Elem": "VDomElem",
"MetaTSType": "MetaType",
"Window": "WaveWindow",
"Elem": "VDomElem",
"MetaTSType": "MetaType",
"MetaSettingsType": "SettingsType",
}
func generateTSTypeInternal(rtype reflect.Type, tsTypesMap map[reflect.Type]string) (string, []reflect.Type) {
@@ -286,6 +288,9 @@ func GenerateTSType(rtype reflect.Type, tsTypesMap map[reflect.Type]string) {
tsTypesMap[rtype] = GenerateWaveObjTSType()
return
}
if rtype == metaSettingsType {
return
}
if rtype.Kind() != reflect.Struct {
return
}