mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
Enable eslint rules prefer-rest-params and prefer-spread (#55181)
This commit is contained in:
1 parent
b35fa04346
commit
3b43d841d1
11 files changed
+40
-49
No files matched your search
@@ -6,6 +6,7 @@ import {
|
||||
arrayToMap,
|
||||
assign,
|
||||
BuildOptions,
|
||||
cast,
|
||||
changeExtension,
|
||||
CharacterCodes,
|
||||
combinePaths,
|
||||
@@ -2018,9 +2019,8 @@ export function parseBuildCommand(args: readonly string[]): ParsedBuildCommand {
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export function getDiagnosticText(_message: DiagnosticMessage, ..._args: any[]): string {
|
||||
const diagnostic = createCompilerDiagnostic.apply(undefined, arguments);
|
||||
return diagnostic.messageText as string;
|
||||
export function getDiagnosticText(message: DiagnosticMessage, ...args: any[]): string {
|
||||
return cast(createCompilerDiagnostic(message, ...args).messageText, isString);
|
||||
}
|
||||
|
||||
export type DiagnosticReporter = (diagnostic: Diagnostic) => void;
|
||||
|
||||
Reference in new issue
Block a user