diff --git a/scripts/gen-scoped-events.ts b/scripts/gen-scoped-events.ts index cca0896be8..a7b93493ca 100644 --- a/scripts/gen-scoped-events.ts +++ b/scripts/gen-scoped-events.ts @@ -175,7 +175,7 @@ class ScopedEventGenerator { }) } } - ts.forEachChild(node, child => { visit(sourceFile, child) }) + ts.forEachChild(node, (child) => { visit(sourceFile, child) }) } for (const sourceFile of this.packageSources) visit(sourceFile, sourceFile) return contracts @@ -264,7 +264,7 @@ class ScopedEventGenerator { scopedBase: ts.Type, contracts: readonly ScopeTargetContract[], ): ts.Type | undefined { - const matches = contracts.filter(contract => { + const matches = contracts.filter((contract) => { return this.checker.isTypeAssignableTo(this.normalizedType(contract.baseType), this.normalizedType(scopedBase)) }) if (matches.length === 0) { diff --git a/scripts/ts-project.ts b/scripts/ts-project.ts index f82b4286c1..0b59aee873 100644 --- a/scripts/ts-project.ts +++ b/scripts/ts-project.ts @@ -13,10 +13,10 @@ interface ProjectGraph { const configHost: ts.ParseConfigFileHost = { useCaseSensitiveFileNames: ts.sys.useCaseSensitiveFileNames, - readDirectory: ts.sys.readDirectory, - fileExists: ts.sys.fileExists, - readFile: ts.sys.readFile, - getCurrentDirectory: ts.sys.getCurrentDirectory, + readDirectory: (...args) => ts.sys.readDirectory(...args), + fileExists: fileName => ts.sys.fileExists(fileName), + readFile: fileName => ts.sys.readFile(fileName), + getCurrentDirectory: () => ts.sys.getCurrentDirectory(), onUnRecoverableConfigFileDiagnostic(diagnostic) { throw new Error(ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n')) },