@@ -60,7 +60,7 @@ function createTextWriter(newLine: string) {
60
60
let output : string ;
61
61
let indent : number ;
62
62
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 */
64
64
let stack : { content : string , indent : number } [ ] = [ ] ;
65
65
66
66
function getIndentString ( level : number ) {
@@ -123,7 +123,7 @@ export function emitWebIdl(webidl: Browser.WebIdl, flavor: Flavor, iterator: boo
123
123
// Global print target
124
124
const printer = createTextWriter ( "\n" ) ;
125
125
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 ) ;
127
127
128
128
const allNonCallbackInterfaces = getElements ( webidl . interfaces , "interface" ) . concat ( getElements ( webidl . mixins , "mixin" ) ) ;
129
129
const allInterfaces = getElements ( webidl . interfaces , "interface" ) . concat (
@@ -591,7 +591,7 @@ export function emitWebIdl(webidl: Browser.WebIdl, flavor: Flavor, iterator: boo
591
591
return `this: ${ nameWithForwardedTypes ( i ) } , ` ;
592
592
}
593
593
else {
594
- return pollutor ? `this: ${ pollutor . name } , ` : "" ;
594
+ return polluter ? `this: ${ polluter . name } , ` : "" ;
595
595
}
596
596
}
597
597
@@ -783,7 +783,7 @@ export function emitWebIdl(webidl: Browser.WebIdl, flavor: Flavor, iterator: boo
783
783
for ( const addOrRemove of [ "add" , "remove" ] ) {
784
784
const optionsType = addOrRemove === "add" ? "AddEventListenerOptions" : "EventListenerOptions" ;
785
785
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
787
787
printer . printLine ( `${ fPrefix } ${ addOrRemove } EventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | ${ optionsType } ): void;` ) ;
788
788
}
789
789
}
@@ -897,7 +897,7 @@ export function emitWebIdl(webidl: Browser.WebIdl, flavor: Flavor, iterator: boo
897
897
printer . endLine ( ) ;
898
898
}
899
899
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
901
901
function shouldEmitIndexerSignature ( i : Browser . Interface , m : Browser . AnonymousMethod ) {
902
902
if ( m . getter && m . signature && m . signature [ 0 ] . param && m . signature [ 0 ] . param ! . length === 1 ) {
903
903
// TypeScript array indexer can only be number or string
@@ -1193,9 +1193,9 @@ export function emitWebIdl(webidl: Browser.WebIdl, flavor: Flavor, iterator: boo
1193
1193
emitNamedConstructors ( ) ;
1194
1194
}
1195
1195
1196
- if ( pollutor ) {
1197
- emitAllMembers ( pollutor ) ;
1198
- emitEventHandlers ( "declare var " , pollutor ) ;
1196
+ if ( polluter ) {
1197
+ emitAllMembers ( polluter ) ;
1198
+ emitEventHandlers ( "declare var " , polluter ) ;
1199
1199
}
1200
1200
1201
1201
emitTypeDefs ( ) ;
0 commit comments