Convert SyncActionDescriptor to use a create function (#84878)

For #81574

See #84669 for details of the problem around strict function types. This change converts `SyncActionDescriptor` to use a static `create` function. This allows us to make the `create` function generic so that it can take the correct types for strictFunctionTypes
This commit is contained in:
Matt Bierner
2019-11-14 16:49:25 -08:00
committed by GitHub
parent 01a1603d51
commit 36a8322ae8
54 changed files with 332 additions and 326 deletions

View File

@@ -359,7 +359,7 @@ class ViewsExtensionHandler implements IWorkbenchContribution {
}
const registry = Registry.as<IWorkbenchActionRegistry>(ActionExtensions.WorkbenchActions);
registry.registerWorkbenchAction(
new SyncActionDescriptor(OpenCustomViewletAction, id, localize('showViewlet', "Show {0}", title)),
SyncActionDescriptor.create(OpenCustomViewletAction, id, localize('showViewlet', "Show {0}", title)),
`View: Show ${title}`,
localize('view', "View")
);