Skip to content

Commit 001632a

Browse files
committed
Fix weird typings
Fixes an overly generic eslint selector. This lets us remove a weird typing workaround
1 parent 2ca79c4 commit 001632a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.eslint-plugin-local/code-no-potentially-unsafe-disposables.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ export = new class implements eslint.Rule.RuleModule {
2828
}
2929

3030
return {
31-
'VariableDeclaration[kind!="const"] NewExpression[callee.name="DisposableStore"]': checkVariableDeclaration,
31+
'VariableDeclaration[kind!="const"] > VariableDeclarator > NewExpression[callee.name="DisposableStore"]': checkVariableDeclaration,
3232

3333
'PropertyDefinition[readonly!=true][typeAnnotation.typeAnnotation.typeName.name=/DisposableStore|MutableDisposable/]': checkProperty,
34-
'PropertyDefinition[readonly!=true] NewExpression[callee.name=/DisposableStore|MutableDisposable/]': checkProperty,
34+
'PropertyDefinition[readonly!=true] > NewExpression[callee.name=/DisposableStore|MutableDisposable/]': checkProperty,
3535
};
3636
}
3737
};

src/vs/workbench/contrib/chat/browser/actions/chatActions.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ export function registerChatActions() {
638638
picker.show();
639639
};
640640

641-
private showIntegratedPicker = async (
641+
private async showIntegratedPicker(
642642
chatService: IChatService,
643643
quickInputService: IQuickInputService,
644644
commandService: ICommandService,
@@ -650,7 +650,7 @@ export function registerChatActions() {
650650
menuService: IMenuService,
651651
showAllChats: boolean = false,
652652
showAllAgents: boolean = false
653-
) => {
653+
) {
654654
const clearChatHistoryButton: IQuickInputButton = {
655655
iconClass: ThemeIcon.asClassName(Codicon.clearAll),
656656
tooltip: localize('interactiveSession.history.clear', "Clear All Workspace Chats"),
@@ -835,7 +835,7 @@ export function registerChatActions() {
835835
};
836836
};
837837

838-
const store = new (DisposableStore as { new(): DisposableStore })();
838+
const store = new DisposableStore();
839839
const picker = store.add(quickInputService.createQuickPick<IChatPickerItem | ICodingAgentPickerItem>({ useSeparators: true }));
840840
picker.title = (showAllChats || showAllAgents) ?
841841
localize('interactiveSession.history.titleAll', "All Workspace Chat History") :
@@ -990,7 +990,7 @@ export function registerChatActions() {
990990
store.add(picker.onDidHide(() => store.dispose()));
991991

992992
picker.show();
993-
};
993+
}
994994

995995
async run(accessor: ServicesAccessor) {
996996
const chatService = accessor.get(IChatService);

0 commit comments

Comments
 (0)