Format the declaration reads changed in #1426

oxfmt joins the .some(...) calls onto the declarations reads, so
format:check passes again.
This commit is contained in:
Chris Tate
2026-10-19 20:14:56 -05:00
parent 187886d2da
commit a1b3ab477b
2 changed files with 11 additions and 10 deletions
@@ -3195,8 +3195,9 @@ export class Lowerer {
const symbol = part.getSymbol();
return (
(symbol?.name === "WeakMap" || symbol?.name === "WeakSet") &&
symbol.declarations
.some((d) => ts.isInterfaceDeclaration(d) && this.isStdlibFile(d.getSourceFile()))
symbol.declarations.some(
(d) => ts.isInterfaceDeclaration(d) && this.isStdlibFile(d.getSourceFile()),
)
);
};
if (!type.isUnionType()) return weak(type);
@@ -1360,8 +1360,9 @@ export function mapAsyncGeneratorAnnotation(type: ts.Type, ctx: TypeMapperCtx):
if (
!symbol ||
!["AsyncIterator", "AsyncIterableIterator", "AsyncIterable"].includes(symbol.name) ||
!symbol.declarations
.some((d) => ts.isInterfaceDeclaration(d) && ctx.isStdlibFile(d.getSourceFile()))
!symbol.declarations.some(
(d) => ts.isInterfaceDeclaration(d) && ctx.isStdlibFile(d.getSourceFile()),
)
)
return null;
const args = checker.getTypeArguments(type as ts.TypeReference);
@@ -2504,12 +2505,11 @@ function mapTypeInner(type: ts.Type, ctx: TypeMapperCtx): IrType | null {
if (
psym &&
WEBCRYPTO_DYN_TYPES.has(psym.name) &&
psym.declarations
.some(
(d) =>
(ts.isClassDeclaration(d) || ts.isInterfaceDeclaration(d)) &&
ctx.isStdlibFile(d.getSourceFile()),
)
psym.declarations.some(
(d) =>
(ts.isClassDeclaration(d) || ts.isInterfaceDeclaration(d)) &&
ctx.isStdlibFile(d.getSourceFile()),
)
) {
return DYN;
}