@@ -41,30 +41,30 @@ interface EmitOptions {
41
41
async function emitFlavor (
42
42
webidl : Browser . WebIdl ,
43
43
forceKnownTypes : Set < string > ,
44
- options : EmitOptions ,
44
+ options : EmitOptions
45
45
) {
46
46
const exposed = getExposedTypes ( webidl , options . global , forceKnownTypes ) ;
47
47
mergeNamesakes ( exposed ) ;
48
48
49
49
const result = emitWebIdl ( exposed , options . global [ 0 ] , "" ) ;
50
50
await fs . writeFile (
51
51
new URL ( `${ options . name } .generated.d.ts` , options . outputFolder ) ,
52
- result ,
52
+ result
53
53
) ;
54
54
55
55
const iterators = emitWebIdl ( exposed , options . global [ 0 ] , "sync" ) ;
56
56
await fs . writeFile (
57
57
new URL ( `${ options . name } .iterable.generated.d.ts` , options . outputFolder ) ,
58
- iterators ,
58
+ iterators
59
59
) ;
60
60
61
61
const asyncIterators = emitWebIdl ( exposed , options . global [ 0 ] , "async" ) ;
62
62
await fs . writeFile (
63
63
new URL (
64
64
`${ options . name } .asynciterable.generated.d.ts` ,
65
- options . outputFolder ,
65
+ options . outputFolder
66
66
) ,
67
- asyncIterators ,
67
+ asyncIterators
68
68
) ;
69
69
}
70
70
@@ -118,7 +118,7 @@ async function emitDom() {
118
118
119
119
const transferables = widlStandardTypes . flatMap ( ( st ) => {
120
120
return Object . values ( st . browser . interfaces ?. interface ?? { } ) . filter (
121
- ( i ) => i . transferable ,
121
+ ( i ) => i . transferable
122
122
) ;
123
123
} ) ;
124
124
@@ -152,12 +152,12 @@ async function emitDom() {
152
152
153
153
function mergeApiDescriptions (
154
154
idl : Browser . WebIdl ,
155
- descriptions : Record < string , string > ,
155
+ descriptions : Record < string , string >
156
156
) {
157
157
const namespaces = arrayToMap (
158
158
idl . namespaces ! ,
159
159
( i ) => i . name ,
160
- ( i ) => i ,
160
+ ( i ) => i
161
161
) ;
162
162
for ( const [ key , value ] of Object . entries ( descriptions ) ) {
163
163
const target = idl . interfaces ! . interface [ key ] || namespaces [ key ] ;
@@ -170,12 +170,12 @@ async function emitDom() {
170
170
171
171
function mergeDeprecatedMessage (
172
172
idl : Browser . WebIdl ,
173
- descriptions : Record < string , string > ,
173
+ descriptions : Record < string , string >
174
174
) {
175
175
const namespaces = arrayToMap (
176
176
idl . namespaces ! ,
177
177
( i ) => i . name ,
178
- ( i ) => i ,
178
+ ( i ) => i
179
179
) ;
180
180
for ( const [ key , value ] of Object . entries ( descriptions ) ) {
181
181
const target = idl . interfaces ! . interface [ key ] || namespaces [ key ] ;
@@ -301,7 +301,7 @@ async function emitDom() {
301
301
302
302
function prune (
303
303
obj : Browser . WebIdl ,
304
- template : Partial < Browser . WebIdl > ,
304
+ template : Partial < Browser . WebIdl >
305
305
) : Browser . WebIdl {
306
306
return filterByNull ( obj , template ) ;
307
307
@@ -312,13 +312,13 @@ async function emitDom() {
312
312
if ( ! obj [ k ] ) {
313
313
console . warn (
314
314
`removedTypes.json has a redundant field ${ k } in ${ JSON . stringify (
315
- template ,
316
- ) . slice ( 0 , 100 ) } `,
315
+ template
316
+ ) . slice ( 0 , 100 ) } `
317
317
) ;
318
318
} else if ( Array . isArray ( template [ k ] ) ) {
319
319
if ( ! Array . isArray ( obj [ k ] ) ) {
320
320
throw new Error (
321
- `Removal template ${ k } is an array but the original field is not` ,
321
+ `Removal template ${ k } is an array but the original field is not`
322
322
) ;
323
323
}
324
324
// template should include strings
@@ -328,18 +328,18 @@ async function emitDom() {
328
328
} ) ;
329
329
if ( filtered [ k ] . length !== obj [ k ] . length - template [ k ] . length ) {
330
330
const differences = template [ k ] . filter (
331
- ( t : any ) => ! obj [ k ] . includes ( t ) ,
331
+ ( t : any ) => ! obj [ k ] . includes ( t )
332
332
) ;
333
333
console . warn (
334
- `removedTypes.json has redundant array items: ${ differences } ` ,
334
+ `removedTypes.json has redundant array items: ${ differences } `
335
335
) ;
336
336
}
337
337
} else if ( template [ k ] !== null ) {
338
338
filtered [ k ] = filterByNull ( obj [ k ] , template [ k ] ) ;
339
339
} else {
340
340
if ( obj [ k ] . exposed === "" ) {
341
341
console . warn (
342
- `removedTypes.json removes ${ k } that has already been disabled by BCD.` ,
342
+ `removedTypes.json removes ${ k } that has already been disabled by BCD.`
343
343
) ;
344
344
}
345
345
delete filtered [ k ] ;
0 commit comments