Use any for the args since we will stringify whatever is passed in (#161421)

* Use any for the args since we will stringify whatever is passed in

* args should also be optional
This commit is contained in:
Tyler James Leonhardt
2022-09-21 14:24:45 -04:00
committed by GitHub
parent bdf82d9fd3
commit 6a6227bc3e
3 changed files with 5 additions and 5 deletions

View File

@@ -1171,12 +1171,12 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
// namespace: l10n
const l10n: typeof vscode.l10n = {
t(...params: [message: string, ...args: string[]] | [{ message: string; args: string[]; comment: string[] }]): string {
t(...params: [message: string, ...args: any[]] | [{ message: string; args?: any[]; comment: string[] }]): string {
checkProposedApiEnabled(extension, 'localization');
if (typeof params[0] === 'string') {
const key = params.shift() as string;
return extHostLocalization.getMessage(extension.identifier.value, { message: key, args: params as string[] });
return extHostLocalization.getMessage(extension.identifier.value, { message: key, args: params as any[] | undefined });
}
return extHostLocalization.getMessage(extension.identifier.value, params[0]);