Skip to content

Commit 951d1df

Browse files
author
Orta Therox
authored
Merge pull request #929 from lifeiscontent/patch-2
Cleanup Typos
2 parents fd0fbad + 5d5478b commit 951d1df

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/emitter.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function createTextWriter(newLine: string) {
6060
let output: string;
6161
let indent: number;
6262
let lineStart: boolean;
63-
/** print declarations conflicting with base interface to a side list to write them under a diffrent name later */
63+
/** print declarations conflicting with base interface to a side list to write them under a different name later */
6464
let stack: { content: string, indent: number }[] = [];
6565

6666
function getIndentString(level: number) {
@@ -123,7 +123,7 @@ export function emitWebIdl(webidl: Browser.WebIdl, flavor: Flavor, iterator: boo
123123
// Global print target
124124
const printer = createTextWriter("\n");
125125

126-
const pollutor = getElements(webidl.interfaces, "interface").find(i => flavor === Flavor.Window ? !!i["primary-global"] : !!i.global);
126+
const polluter = getElements(webidl.interfaces, "interface").find(i => flavor === Flavor.Window ? !!i["primary-global"] : !!i.global);
127127

128128
const allNonCallbackInterfaces = getElements(webidl.interfaces, "interface").concat(getElements(webidl.mixins, "mixin"));
129129
const allInterfaces = getElements(webidl.interfaces, "interface").concat(
@@ -591,7 +591,7 @@ export function emitWebIdl(webidl: Browser.WebIdl, flavor: Flavor, iterator: boo
591591
return `this: ${nameWithForwardedTypes(i)}, `;
592592
}
593593
else {
594-
return pollutor ? `this: ${pollutor.name}, ` : "";
594+
return polluter ? `this: ${polluter.name}, ` : "";
595595
}
596596
}
597597

@@ -783,7 +783,7 @@ export function emitWebIdl(webidl: Browser.WebIdl, flavor: Flavor, iterator: boo
783783
for (const addOrRemove of ["add", "remove"]) {
784784
const optionsType = addOrRemove === "add" ? "AddEventListenerOptions" : "EventListenerOptions";
785785
if (tryEmitTypedEventHandlerForInterface(addOrRemove, optionsType)) {
786-
// only emit the string event handler if we just emited a typed handler
786+
// only emit the string event handler if we just emitted a typed handler
787787
printer.printLine(`${fPrefix}${addOrRemove}EventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | ${optionsType}): void;`);
788788
}
789789
}
@@ -897,7 +897,7 @@ export function emitWebIdl(webidl: Browser.WebIdl, flavor: Flavor, iterator: boo
897897
printer.endLine();
898898
}
899899

900-
/// To decide if a given method is an indexer and should be emited
900+
/// To decide if a given method is an indexer and should be emitted
901901
function shouldEmitIndexerSignature(i: Browser.Interface, m: Browser.AnonymousMethod) {
902902
if (m.getter && m.signature && m.signature[0].param && m.signature[0].param!.length === 1) {
903903
// TypeScript array indexer can only be number or string
@@ -1193,9 +1193,9 @@ export function emitWebIdl(webidl: Browser.WebIdl, flavor: Flavor, iterator: boo
11931193
emitNamedConstructors();
11941194
}
11951195

1196-
if (pollutor) {
1197-
emitAllMembers(pollutor);
1198-
emitEventHandlers("declare var ", pollutor);
1196+
if (polluter) {
1197+
emitAllMembers(polluter);
1198+
emitEventHandlers("declare var ", polluter);
11991199
}
12001200

12011201
emitTypeDefs();

0 commit comments

Comments
 (0)