(method reflect.Method, tsTypesMap map[reflect.Type]string, skipFirstArg bool)
| 74 | var wshRpcInterfaceRType = reflect.TypeOf((*wshrpc.WshRpcInterface)(nil)).Elem() |
| 75 | |
| 76 | func generateTSMethodTypes(method reflect.Method, tsTypesMap map[reflect.Type]string, skipFirstArg bool) error { |
| 77 | for idx := 0; idx < method.Type.NumIn(); idx++ { |
| 78 | if skipFirstArg && idx == 0 { |
| 79 | continue |
| 80 | } |
| 81 | inType := method.Type.In(idx) |
| 82 | GenerateTSType(inType, tsTypesMap) |
| 83 | } |
| 84 | for idx := 0; idx < method.Type.NumOut(); idx++ { |
| 85 | outType := method.Type.Out(idx) |
| 86 | GenerateTSType(outType, tsTypesMap) |
| 87 | } |
| 88 | return nil |
| 89 | } |
| 90 | |
| 91 | func getTSFieldName(field reflect.StructField) string { |
| 92 | tsFieldTag := field.Tag.Get("tsfield") |
no test coverage detected