File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ export const WebRPCSchemaVersion = "{{.SchemaVersion}}"
76
76
// Schema hash generated from your RIDL schema
77
77
export const WebRPCSchemaHash = "{{.SchemaHash}}"
78
78
79
- {{template "types" dict "Types" .Types "Services" .Services "TypeMap" $typeMap}}
79
+ {{template "types" dict "Types" .Types "Services" .Services "TypeMap" $typeMap "WebrpcVersion" .WebrpcVersion }}
80
80
81
81
{{- if $opts.client}}
82
82
{{template "client" dict "Services" .Services "Opts" $opts "TypeMap" $typeMap}}
Original file line number Diff line number Diff line change 3
3
{{- $typeMap := .TypeMap -}}
4
4
{{- $types := .Types -}}
5
5
{{- $services := .Services -}}
6
+ {{- $webrpcVersion := .WebrpcVersion -}}
6
7
7
8
//
8
9
// Types
@@ -44,6 +45,7 @@ export interface {{$type.Name}} {
44
45
{{- range $_, $service := $services}}
45
46
export interface {{$service.Name}} {
46
47
{{- range $_, $method := $service.Methods}}
48
+ {{- if not (minVersion $webrpcVersion "v0.20.0") }}
47
49
{{- $deprecated := index $method.Annotations "deprecated" -}}
48
50
{{- if or (gt (len $method.Comments) 0) ($deprecated) }}
49
51
/**
@@ -54,7 +56,8 @@ export interface {{$service.Name}} {
54
56
* @deprecated {{ if ne $deprecated.Value "" }}use {{ $deprecated.Value }}{{ end }}
55
57
{{- end }}
56
58
*/
57
- {{- end }}
59
+ {{- end }}
60
+ {{- end }}
58
61
{{firstLetterToLower $method.Name}}({{template "methodInputs" dict "Method" $method "TypeMap" $typeMap}}): Promise<{{if $method.StreamOutput}}void{{else}}{{$method.Name}}Return{{end}}>
59
62
{{- end}}
60
63
}
You can’t perform that action at this time.
0 commit comments