@@ -137,7 +137,7 @@ export class HTTPHeaderLink {
137
137
#entries: HTTPHeaderLinkEntry [ ] = [ ] ;
138
138
/**
139
139
* Handle the HTTP header `Link` according to the specification RFC 8288.
140
- * @param {...(string | Headers | HTTPHeaderLink | HTTPHeaderLinkEntry[] | Response) } inputs Inputs .
140
+ * @param {...(string | Headers | HTTPHeaderLink | HTTPHeaderLinkEntry[] | Response) } inputs Input .
141
141
*/
142
142
constructor ( ...inputs : ( string | Headers | HTTPHeaderLink | HTTPHeaderLinkEntry [ ] | Response ) [ ] ) {
143
143
if ( inputs . length > 0 ) {
@@ -146,7 +146,7 @@ export class HTTPHeaderLink {
146
146
}
147
147
/**
148
148
* Add entries.
149
- * @param {...(string | Headers | HTTPHeaderLink | HTTPHeaderLinkEntry[] | Response) } inputs Inputs .
149
+ * @param {...(string | Headers | HTTPHeaderLink | HTTPHeaderLinkEntry[] | Response) } inputs Input .
150
150
* @returns {this }
151
151
*/
152
152
add ( ...inputs : ( string | Headers | HTTPHeaderLink | HTTPHeaderLinkEntry [ ] | Response ) [ ] ) : this {
@@ -191,7 +191,7 @@ export class HTTPHeaderLink {
191
191
* Get entries by parameter.
192
192
* @param {string } key Key of the parameter.
193
193
* @param {string } value Value of the parameter.
194
- * @returns {HTTPHeaderLinkEntry[] } Entries.
194
+ * @returns {HTTPHeaderLinkEntry[] } Entries which match the parameter .
195
195
*/
196
196
getByParameter ( key : string , value : string ) : HTTPHeaderLinkEntry [ ] {
197
197
if ( key !== key . toLowerCase ( ) ) {
@@ -207,7 +207,7 @@ export class HTTPHeaderLink {
207
207
/**
208
208
* Get entries by parameter `rel`.
209
209
* @param {string } value Value of the parameter `rel`.
210
- * @returns {HTTPHeaderLinkEntry[] } Entries.
210
+ * @returns {HTTPHeaderLinkEntry[] } Entries which match the parameter .
211
211
*/
212
212
getByRel ( value : string ) : HTTPHeaderLinkEntry [ ] {
213
213
if ( value !== value . toLowerCase ( ) ) {
@@ -221,7 +221,7 @@ export class HTTPHeaderLink {
221
221
* Whether have entries that match parameter.
222
222
* @param {string } key Key of the parameter.
223
223
* @param {string } value Value of the parameter.
224
- * @returns {boolean } Result .
224
+ * @returns {boolean } Determine result .
225
225
*/
226
226
hasParameter ( key : string , value : string ) : boolean {
227
227
return ( this . getByParameter ( key , value ) . length > 0 ) ;
@@ -242,19 +242,19 @@ export class HTTPHeaderLink {
242
242
}
243
243
/**
244
244
* Parse the HTTP header `Link` according to the specification RFC 8288.
245
- * @param {string | Headers | HTTPHeaderLink | Response } input Input.
245
+ * @param {...( string | Headers | HTTPHeaderLink | HTTPHeaderLinkEntry[] | Response) } inputs Input.
246
246
* @returns {HTTPHeaderLink }
247
247
*/
248
- static parse ( input : string | Headers | HTTPHeaderLink | Response ) : HTTPHeaderLink {
249
- return new this ( input ) ;
248
+ static parse ( ... inputs : ( string | Headers | HTTPHeaderLink | HTTPHeaderLinkEntry [ ] | Response ) [ ] ) : HTTPHeaderLink {
249
+ return new this ( ... inputs ) ;
250
250
}
251
251
/**
252
252
* Stringify as the HTTP header `Link` according to the specification RFC 8288.
253
- * @param {HTTPHeaderLinkEntry[] } input Input.
253
+ * @param {...(string | Headers | HTTPHeaderLink | HTTPHeaderLinkEntry[] | Response) } inputs Input.
254
254
* @returns {string }
255
255
*/
256
- static stringify ( input : HTTPHeaderLinkEntry [ ] ) : string {
257
- return new this ( input ) . toString ( ) ;
256
+ static stringify ( ... inputs : ( string | Headers | HTTPHeaderLink | HTTPHeaderLinkEntry [ ] | Response ) [ ] ) : string {
257
+ return new this ( ... inputs ) . toString ( ) ;
258
258
}
259
259
}
260
260
export default HTTPHeaderLink ;
0 commit comments