-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutil.rbs
More file actions
195 lines (144 loc) · 4.99 KB
/
util.rbs
File metadata and controls
195 lines (144 loc) · 4.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
module TildaRuby
module Internal
module Util
extend TildaRuby::Internal::Util::SorbetRuntimeSupport
def self?.monotonic_secs: -> Float
def self?.walk_namespaces: (
Module | Class ns
) -> Enumerable[(Module | Class)]
def self?.arch: -> String
def self?.os: -> String
def self?.primitive?: (top input) -> bool
def self?.coerce_boolean: (String | bool input) -> (bool | top)
def self?.coerce_boolean!: (String | bool input) -> bool?
def self?.coerce_integer: (String | Integer input) -> (Integer | top)
def self?.coerce_float: (String | Integer | Float input) -> (Float | top)
def self?.coerce_hash: (top input) -> (::Hash[top, top] | top)
def self?.coerce_hash!: (top input) -> ::Hash[top, top]?
def self?.deep_merge_lr: (top lhs, top rhs, ?concat: bool) -> top
def self?.deep_merge: (
*::Array[top] values,
?sentinel: top?,
?concat: bool
) -> top
def self?.dig: (
::Hash[Symbol, top] | ::Array[top] | top data,
(Symbol
| Integer
| ::Array[(Symbol | Integer)]
| (^(top arg0) -> top))? pick
) {
-> top?
} -> top?
def self?.uri_origin: (URI::Generic uri) -> String
def self?.interpolate_path: (String | ::Array[String] path) -> String
def self?.decode_query: (String? query) -> ::Hash[String, ::Array[String]]
def self?.encode_query: (
::Hash[String, (::Array[String] | String)?]? query
) -> String?
type parsed_uri =
{
scheme: String?,
host: String?,
port: Integer?,
path: String?,
query: ::Hash[String, ::Array[String]]
}
def self?.parse_uri: (
URI::Generic | String url
) -> TildaRuby::Internal::Util::parsed_uri
def self?.unparse_uri: (
TildaRuby::Internal::Util::parsed_uri parsed
) -> URI::Generic
def self?.join_parsed_uri: (
TildaRuby::Internal::Util::parsed_uri lhs,
TildaRuby::Internal::Util::parsed_uri rhs
) -> URI::Generic
def self?.normalized_headers: (
*::Hash[String, (String
| Integer
| ::Array[(String | Integer)?])?] headers
) -> ::Hash[String, String]
class ReadIOAdapter
def close?: -> bool?
def close: -> void
private def read_enum: (Integer? max_len) -> String
def read: (?Integer? max_len, ?String? out_string) -> String?
def initialize: (
String | Pathname | StringIO | Enumerable[String] src
) {
(String arg0) -> void
} -> void
end
def self?.writable_enum: {
(Enumerator::Yielder y) -> void
} -> Enumerable[String]
JSON_CONTENT: Regexp
JSONL_CONTENT: Regexp
def encode_query_params: (
::Hash[Symbol, top] query
) -> ::Hash[Symbol, top]
private def write_query_param_element!: (
::Hash[Symbol, top] collection,
String key,
top element
) -> nil
def self?.write_multipart_content: (
Enumerator::Yielder y,
val: top,
closing: ::Array[^-> void],
?content_type: String?
) -> void
def self?.write_multipart_chunk: (
Enumerator::Yielder y,
boundary: String,
key: Symbol | String,
val: top,
closing: ::Array[^-> void]
) -> void
def self?.encode_multipart_streaming: (
top body
) -> [String, Enumerable[String]]
def self?.encode_content: (
::Hash[String, String] headers,
top body
) -> top
def self?.force_charset!: (String content_type, text: String) -> void
def self?.decode_content: (
::Hash[String, String] headers,
stream: Enumerable[String],
?suppress_error: bool
) -> top
def self?.fused_enum: (
Enumerable[top] enum,
?external: bool
) {
-> void
} -> Enumerable[top]
def self?.close_fused!: (Enumerable[top]? enum) -> void
def self?.chain_fused: (
Enumerable[top]? enum
) {
(Enumerator::Yielder arg0) -> void
} -> Enumerable[top]
type server_sent_event =
{ event: String?, data: String?, id: String?, retry: Integer? }
def self?.decode_lines: (Enumerable[String] enum) -> Enumerable[String]
def self?.decode_sse: (
Enumerable[String] lines
) -> Enumerable[TildaRuby::Internal::Util::server_sent_event]
module SorbetRuntimeSupport
class MissingSorbetRuntimeError < ::RuntimeError
end
private def sorbet_runtime_constants: -> ::Hash[Symbol, top]
def const_missing: (Symbol name) -> void
def sorbet_constant_defined?: (Symbol name) -> bool
def define_sorbet_constant!: (Symbol name) { -> top } -> void
def to_sorbet_type: -> top
def self.to_sorbet_type: (
TildaRuby::Internal::Util::SorbetRuntimeSupport | top `type`
) -> top
end
end
end
end