Add SyncActionDescriptor.from helper (#95731)
* Add SyncActionDescriptor.from There are a whole lot of places in our code where have the following pattern: ``` actionRegistry.registerWorkbenchAction(SyncActionDescriptor.create(CreateNewLocalTerminalAction, CreateNewLocalTerminalAction.ID, CreateNewLocalTerminalAction.LABEL)); ``` Notice how the class name has to be repeated three times. This change introduces a helper function `SyncActionDescriptor.from` that lets you instead just pass in the class: ```js actionRegistry.registerWorkbenchAction(SyncActionDescriptor.create(CreateNewLocalTerminalAction)); ``` * Avoid cast
Showing
想要评论请 注册 或 登录