mirror of
https://github.com/denoland/deno.git
synced 2024-11-26 16:09:27 -05:00
Format.
This commit is contained in:
parent
826c2f4dac
commit
09e011b389
4 changed files with 9 additions and 9 deletions
|
@ -296,8 +296,8 @@ export interface Headers {
|
||||||
append(name: string, value: string): void;
|
append(name: string, value: string): void;
|
||||||
/** Deletes a header from a `Headers` object. */
|
/** Deletes a header from a `Headers` object. */
|
||||||
delete(name: string): void;
|
delete(name: string): void;
|
||||||
/** Returns an iterator allowing to go through all key/value pairs
|
/** Returns an iterator allowing to go through all key/value pairs
|
||||||
* contained in this Headers object. The both the key and value of each pairs
|
* contained in this Headers object. The both the key and value of each pairs
|
||||||
* are ByteString objects.
|
* are ByteString objects.
|
||||||
*/
|
*/
|
||||||
entries(): IterableIterator<[string, string]>;
|
entries(): IterableIterator<[string, string]>;
|
||||||
|
@ -309,7 +309,7 @@ export interface Headers {
|
||||||
* header.
|
* header.
|
||||||
*/
|
*/
|
||||||
has(name: string): boolean;
|
has(name: string): boolean;
|
||||||
/** Returns an iterator allowing to go through all keys contained in
|
/** Returns an iterator allowing to go through all keys contained in
|
||||||
* this Headers object. The keys are ByteString objects.
|
* this Headers object. The keys are ByteString objects.
|
||||||
*/
|
*/
|
||||||
keys(): IterableIterator<string>;
|
keys(): IterableIterator<string>;
|
||||||
|
@ -317,7 +317,7 @@ export interface Headers {
|
||||||
* the header if it does not already exist.
|
* the header if it does not already exist.
|
||||||
*/
|
*/
|
||||||
set(name: string, value: string): void;
|
set(name: string, value: string): void;
|
||||||
/** Returns an iterator allowing to go through all values contained in
|
/** Returns an iterator allowing to go through all values contained in
|
||||||
* this Headers object. The values are ByteString objects.
|
* this Headers object. The values are ByteString objects.
|
||||||
*/
|
*/
|
||||||
values(): IterableIterator<string>;
|
values(): IterableIterator<string>;
|
||||||
|
@ -326,7 +326,7 @@ export interface Headers {
|
||||||
// tslint:disable-next-line:no-any
|
// tslint:disable-next-line:no-any
|
||||||
thisArg?: any
|
thisArg?: any
|
||||||
): void;
|
): void;
|
||||||
/** The Symbol.iterator well-known symbol specifies the default
|
/** The Symbol.iterator well-known symbol specifies the default
|
||||||
* iterator for this Headers object
|
* iterator for this Headers object
|
||||||
*/
|
*/
|
||||||
[Symbol.iterator](): IterableIterator<[string, string]>;
|
[Symbol.iterator](): IterableIterator<[string, string]>;
|
||||||
|
|
|
@ -89,7 +89,7 @@ export class DenoHeaders implements domTypes.Headers {
|
||||||
|
|
||||||
keys(): IterableIterator<string> {
|
keys(): IterableIterator<string> {
|
||||||
const iterators = this.headerMap.keys();
|
const iterators = this.headerMap.keys();
|
||||||
return new CreateIterableIterator(iterators);
|
return new CreateIterableIterator(iterators);
|
||||||
}
|
}
|
||||||
|
|
||||||
set(name: string, value: string): void {
|
set(name: string, value: string): void {
|
||||||
|
@ -99,7 +99,7 @@ export class DenoHeaders implements domTypes.Headers {
|
||||||
|
|
||||||
values(): IterableIterator<string> {
|
values(): IterableIterator<string> {
|
||||||
const iterators = this.headerMap.values();
|
const iterators = this.headerMap.values();
|
||||||
return new CreateIterableIterator(iterators);
|
return new CreateIterableIterator(iterators);
|
||||||
}
|
}
|
||||||
|
|
||||||
forEach(
|
forEach(
|
||||||
|
|
|
@ -138,7 +138,7 @@ export class CreateIterableIterator<T> implements IterableIterator<T> {
|
||||||
|
|
||||||
[Symbol.iterator](): IterableIterator<T> {
|
[Symbol.iterator](): IterableIterator<T> {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
next(): IteratorResult<T> {
|
next(): IteratorResult<T> {
|
||||||
return this._iterators.next();
|
return this._iterators.next();
|
||||||
|
|
|
@ -23,4 +23,4 @@ test(function CreateIterableIteratorSuccess() {
|
||||||
assert(key in obj);
|
assert(key in obj);
|
||||||
assertEqual(value, obj[key]);
|
assertEqual(value, obj[key]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue