mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
chore: deps
This commit is contained in:
@@ -260,6 +260,7 @@ export class ExportAnalyzer {
|
||||
: undefined;
|
||||
|
||||
const resolvedModule: ts.ResolvedModuleFull | undefined = TypeScriptInternals.getResolvedModule(
|
||||
this._program,
|
||||
importOrExportDeclaration.getSourceFile(),
|
||||
moduleSpecifier,
|
||||
mode,
|
||||
@@ -856,6 +857,7 @@ export class ExportAnalyzer {
|
||||
)
|
||||
: undefined;
|
||||
const resolvedModule: ts.ResolvedModuleFull | undefined = TypeScriptInternals.getResolvedModule(
|
||||
this._program,
|
||||
importOrExportDeclaration.getSourceFile(),
|
||||
moduleSpecifier,
|
||||
mode,
|
||||
|
||||
@@ -369,7 +369,7 @@ export class Span {
|
||||
* can make changes to Span.modification for each node.
|
||||
*/
|
||||
public forEach(callback: (span: Span) => void): void {
|
||||
// eslint-disable-next-line n/callback-return, n/no-callback-literal
|
||||
// eslint-disable-next-line n/callback-return
|
||||
callback(this);
|
||||
for (const child of this.children) {
|
||||
// eslint-disable-next-line unicorn/no-array-for-each
|
||||
|
||||
@@ -75,14 +75,19 @@ export class TypeScriptInternals {
|
||||
* The compiler populates this cache as part of analyzing the source file.
|
||||
*/
|
||||
public static getResolvedModule(
|
||||
program: ts.Program,
|
||||
sourceFile: ts.SourceFile,
|
||||
moduleNameText: string,
|
||||
mode: ts.ModuleKind.CommonJS | ts.ModuleKind.ESNext | undefined,
|
||||
): ts.ResolvedModuleFull | undefined {
|
||||
// Compiler internal:
|
||||
// https://github.com/microsoft/TypeScript/blob/v4.7.2/src/compiler/utilities.ts#L161
|
||||
|
||||
return (ts as any).getResolvedModule(sourceFile, moduleNameText, mode);
|
||||
// https://github.com/microsoft/TypeScript/blob/v5.3.3/src/compiler/types.ts#L4698
|
||||
const result: ts.ResolvedModuleWithFailedLookupLocations | undefined = (program as any).getResolvedModule(
|
||||
sourceFile,
|
||||
moduleNameText,
|
||||
mode,
|
||||
);
|
||||
return result?.resolvedModule;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -45,7 +45,7 @@ export class ApiExtractorCommandLine extends CommandLineParser {
|
||||
console.error(os.EOL + colors.red('ERROR: ' + error.message.trim()));
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-restricted-globals, n/prefer-global/process
|
||||
// eslint-disable-next-line no-restricted-globals
|
||||
process.exitCode = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable n/prefer-global/process */
|
||||
/* eslint-disable no-restricted-globals */
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
||||
// See LICENSE in the project root for license information.
|
||||
|
||||
Reference in New Issue
Block a user