mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-19 08:08:39 +01:00
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:
committed by
GitHub
parent
bdf82d9fd3
commit
6a6227bc3e
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user