1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-22 15:06:54 -05:00
This commit is contained in:
Ryan Dahl 2018-10-19 19:15:27 -04:00
parent 826c2f4dac
commit 09e011b389
4 changed files with 9 additions and 9 deletions

View file

@ -296,8 +296,8 @@ export interface Headers {
append(name: string, value: string): void;
/** Deletes a header from a `Headers` object. */
delete(name: string): void;
/** 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
/** 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
* are ByteString objects.
*/
entries(): IterableIterator<[string, string]>;
@ -309,7 +309,7 @@ export interface Headers {
* header.
*/
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.
*/
keys(): IterableIterator<string>;
@ -317,7 +317,7 @@ export interface Headers {
* the header if it does not already exist.
*/
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.
*/
values(): IterableIterator<string>;
@ -326,7 +326,7 @@ export interface Headers {
// tslint:disable-next-line:no-any
thisArg?: any
): void;
/** The Symbol.iterator well-known symbol specifies the default
/** The Symbol.iterator well-known symbol specifies the default
* iterator for this Headers object
*/
[Symbol.iterator](): IterableIterator<[string, string]>;

View file

@ -89,7 +89,7 @@ export class DenoHeaders implements domTypes.Headers {
keys(): IterableIterator<string> {
const iterators = this.headerMap.keys();
return new CreateIterableIterator(iterators);
return new CreateIterableIterator(iterators);
}
set(name: string, value: string): void {
@ -99,7 +99,7 @@ export class DenoHeaders implements domTypes.Headers {
values(): IterableIterator<string> {
const iterators = this.headerMap.values();
return new CreateIterableIterator(iterators);
return new CreateIterableIterator(iterators);
}
forEach(

View file

@ -138,7 +138,7 @@ export class CreateIterableIterator<T> implements IterableIterator<T> {
[Symbol.iterator](): IterableIterator<T> {
return this;
}
}
next(): IteratorResult<T> {
return this._iterators.next();

View file

@ -23,4 +23,4 @@ test(function CreateIterableIteratorSuccess() {
assert(key in obj);
assertEqual(value, obj[key]);
}
});
});