-
Notifications
You must be signed in to change notification settings - Fork 180
/
Aborter.yml
241 lines (219 loc) · 7.35 KB
/
Aborter.yml
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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
### YamlMime:TSType
name: Aborter
uid: '@azure/storage-file.Aborter'
package: '@azure/storage-file'
summary: >
An aborter instance implements AbortSignal interface, can abort HTTP requests.
- Call Aborter.none to create a new Aborter instance without timeout.
- Call Aborter.timeout() to create a new Aborter instance with timeout.
For an existing instance aborter:
- Call aborter.withTimeout() to create and return a child Aborter instance
with timeout.
- Call aborter.withValue(key, value) to create and return a child Aborter
instance with key/value pair.
- Call aborter.abort() to abort current instance and all children instances.
- Call aborter.getValue(key) to search and get value with corresponding key
from current aborter to all parents.
fullName: Aborter
remarks: ''
isPreview: false
isDeprecated: false
type: class
properties:
- name: aborted
uid: '@azure/storage-file.Aborter.aborted'
package: '@azure/storage-file'
summary: Status of whether aborted or not.
fullName: aborted
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'aborted: boolean'
return:
type: boolean
description: ''
- name: none
uid: '@azure/storage-file.Aborter.none'
package: '@azure/storage-file'
summary: Creates a new Aborter instance without timeout.
fullName: none
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'static none: Aborter'
return:
type: <xref uid="@azure/storage-file.Aborter" />
description: ''
- name: onabort
uid: '@azure/storage-file.Aborter.onabort'
package: '@azure/storage-file'
summary: onabort event listener.
fullName: onabort
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'onabort: (this: AbortSignalLike, ev: any) => any | null'
return:
type: '(this: AbortSignalLike, ev: any) => any | null'
description: ''
methods:
- name: abort()
uid: '@azure/storage-file.Aborter.abort'
package: '@azure/storage-file'
summary: >
Trigger abort event immediately, the onabort and all abort event listeners
will be triggered.
Will try to trigger abort event for all children Aborter nodes.
- If there is a timeout, the timer will be cancelled.
- If aborted is true, nothing will happen.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: function abort()
- name: 'addEventListener("abort", (this: AbortSignalLike, ev: any) => any)'
uid: '@azure/storage-file.Aborter.addEventListener'
package: '@azure/storage-file'
summary: 'Added new "abort" event listener, only support "abort" event.'
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: >-
function addEventListener(_type: "abort", listener: (this:
AbortSignalLike, ev: any) => any)
parameters:
- id: _type
type: '"abort"'
description: Only support "abort" event
- id: listener
type: '(this: AbortSignalLike, ev: any) => any'
description: ''
- name: dispatchEvent()
uid: '@azure/storage-file.Aborter.dispatchEvent'
package: '@azure/storage-file'
summary: ''
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: function dispatchEvent()
return:
type: boolean
description: ''
- name: getValue(string)
uid: '@azure/storage-file.Aborter.getValue'
package: '@azure/storage-file'
summary: >
Find out latest value with corresponding key in the chain of
[current node] -> [parent node] -> [grand parent node] -> ... -> [root
node].
If key is not found, undefined will be returned.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function getValue(key: string)'
parameters:
- id: key
type: string
description: ''
return:
type: string | number | boolean | null | undefined
description: ''
- name: 'removeEventListener("abort", (this: AbortSignalLike, ev: any) => any)'
uid: '@azure/storage-file.Aborter.removeEventListener'
package: '@azure/storage-file'
summary: 'Remove "abort" event listener, only support "abort" event.'
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: >-
function removeEventListener(_type: "abort", listener: (this:
AbortSignalLike, ev: any) => any)
parameters:
- id: _type
type: '"abort"'
description: Only support "abort" event
- id: listener
type: '(this: AbortSignalLike, ev: any) => any'
description: ''
- name: timeout(number)
uid: '@azure/storage-file.Aborter.timeout'
package: '@azure/storage-file'
summary: |-
Creates a new Aborter instance with timeout in milliseconds.
Set parameter timeout to 0 will not create a timer.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'static function timeout(timeout: number)'
parameters:
- id: timeout
type: number
description: ''
return:
type: <xref uid="@azure/storage-file.Aborter" />
description: ''
- name: withTimeout(number)
uid: '@azure/storage-file.Aborter.withTimeout'
package: '@azure/storage-file'
summary: >
Create and return a new Aborter instance, which will be appended as a
child node of current Aborter.
Current Aborter instance becomes father node of the new instance. When
current or father Aborter node
triggers timeout event, all children nodes abort event will be triggered
too.
When timeout parameter (in millisecond) is larger than 0, the abort event
will be triggered when timeout.
Otherwise, call abort() method to manually abort.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'function withTimeout(timeout: number)'
parameters:
- id: timeout
type: number
description: ''
return:
type: <xref uid="@azure/storage-file.Aborter" />
description: The new Aborter instance created.
- name: 'withValue(string, string | number | boolean | null)'
uid: '@azure/storage-file.Aborter.withValue'
package: '@azure/storage-file'
summary: >
Create and return a new Aborter instance, which will be appended as a
child node of current Aborter.
Current Aborter instance becomes father node of the new instance. When
current or father Aborter node
triggers timeout event, all children nodes abort event will be triggered
too.
Immutable key value pair will be set into the new created Aborter
instance.
Call getValue() to find out latest value with corresponding key in the
chain of
[current node] -> [parent node] and [grand parent node]....
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: >-
function withValue(key: string, value?: string | number | boolean |
null)
parameters:
- id: key
type: string
description: ''
- id: value
type: string | number | boolean | null
description: ''
return:
type: <xref uid="@azure/storage-file.Aborter" />
description: ''