Skip to content

Commit fdb1937

Browse files
chore: run prettier
1 parent 66725f0 commit fdb1937

File tree

4 files changed

+26
-21
lines changed

4 files changed

+26
-21
lines changed

src/dynamic-param-interfaces.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,9 @@ const flushParamInterfaces = (
195195
return paramPropertyType;
196196
});
197197
}
198-
const isReadonly = (paramProperty.additionalTags || []).includes(DocumentationTag.AVAILABILITY_READONLY)
198+
const isReadonly = (paramProperty.additionalTags || []).includes(
199+
DocumentationTag.AVAILABILITY_READONLY,
200+
)
199201
? 'readonly '
200202
: '';
201203
if (
@@ -215,9 +217,9 @@ const flushParamInterfaces = (
215217
);
216218
} else {
217219
paramAPI.push(
218-
`${isReadonly}${paramProperty.name}${utils.isOptional(paramProperty) ? '?' : ''}: ${utils.typify(
219-
paramProperty,
220-
)};`,
220+
`${isReadonly}${paramProperty.name}${
221+
utils.isOptional(paramProperty) ? '?' : ''
222+
}: ${utils.typify(paramProperty)};`,
221223
);
222224
}
223225
});

src/master-interfaces.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ export const generateMasterInterfaces = (
8686
!EMRI[classify(module.name).toLowerCase()]
8787
) {
8888
MainInterfaceForRemote.push(
89-
` ${classify(module.name)}: ${isClass || isModuleButActuallyStaticClass ? 'typeof ' : ''}${_.upperFirst(module.name)};`,
89+
` ${classify(module.name)}: ${
90+
isClass || isModuleButActuallyStaticClass ? 'typeof ' : ''
91+
}${_.upperFirst(module.name)};`,
9092
);
9193
}
9294
if (TargetNamespace) {

src/module-declaration.ts

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -310,10 +310,7 @@ export const generateModuleDeclaration = (
310310
? 'readonly '
311311
: '';
312312
if (prop.description) {
313-
utils.extendArray(
314-
moduleAPI,
315-
utils.wrapComment(prop.description, prop.additionalTags),
316-
);
313+
utils.extendArray(moduleAPI, utils.wrapComment(prop.description, prop.additionalTags));
317314
}
318315
moduleAPI.push(`${isReadonly}${prop.name}${isOptional}: ${utils.typify(prop)};`);
319316
});
@@ -328,10 +325,7 @@ export const generateModuleDeclaration = (
328325
? 'readonly '
329326
: '';
330327
if (prop.description) {
331-
utils.extendArray(
332-
moduleAPI,
333-
utils.wrapComment(prop.description, prop.additionalTags),
334-
);
328+
utils.extendArray(moduleAPI, utils.wrapComment(prop.description, prop.additionalTags));
335329
}
336330
moduleAPI.push(`static ${isReadonly}${prop.name}: ${utils.typify(prop)};`);
337331
});
@@ -348,13 +342,20 @@ export const generateModuleDeclaration = (
348342
if (paramType.type === 'Object') {
349343
type = DynamicParamInterfaces.createParamInterface(p as any, '');
350344
} else if (Array.isArray(paramType.type)) {
351-
paramType.type = paramType.type.map(t => t.type !== 'Object' ? t : ({
352-
...t,
353-
type: DynamicParamInterfaces.createParamInterface({
354-
...p,
355-
type: t,
356-
} as any, ''),
357-
}))
345+
paramType.type = paramType.type.map(t =>
346+
t.type !== 'Object'
347+
? t
348+
: {
349+
...t,
350+
type: DynamicParamInterfaces.createParamInterface(
351+
{
352+
...p,
353+
type: t,
354+
} as any,
355+
'',
356+
),
357+
},
358+
);
358359
}
359360

360361
const isStatic = isStaticVersion ? 'static ' : '';

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ export const isEmitter = (module: Pick<ModuleDocumentationContainer, 'name'>) =>
262262
'net',
263263
'netlog',
264264
'protocol',
265-
'contextbridge'
265+
'contextbridge',
266266
];
267267
return !nonEventEmitters.includes(module.name.toLowerCase());
268268
};

0 commit comments

Comments
 (0)