Skip to content

Commit ccd5313

Browse files
authored
Use wider type for "reveal in model editor" (#3512)
1 parent 38e862c commit ccd5313

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

extensions/ql-vscode/src/common/interface-types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import type {
1010
} from "../variant-analysis/shared/variant-analysis-filter-sort";
1111
import type { ErrorLike } from "../common/errors";
1212
import type { DataFlowPaths } from "../variant-analysis/shared/data-flow-paths";
13-
import type { Method } from "../model-editor/method";
13+
import type { Method, MethodSignature } from "../model-editor/method";
1414
import type { ModeledMethod } from "../model-editor/modeled-method";
1515
import type {
1616
MethodModelingPanelViewState,
@@ -681,7 +681,7 @@ export type FromModelEditorMessage =
681681

682682
interface RevealInEditorMessage {
683683
t: "revealInModelEditor";
684-
method: Method;
684+
method: MethodSignature;
685685
}
686686

687687
interface StartModelingMessage {

extensions/ql-vscode/src/model-editor/method-modeling/method-modeling-view-provider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { telemetryListener } from "../../common/vscode/telemetry";
66
import { showAndLogExceptionWithTelemetry } from "../../common/logging/notifications";
77
import type { App } from "../../common/app";
88
import { redactableError } from "../../common/errors";
9-
import type { Method } from "../method";
9+
import type { Method, MethodSignature } from "../method";
1010
import type { ModelingStore } from "../modeling-store";
1111
import { AbstractWebviewViewProvider } from "../../common/vscode/abstract-webview-view-provider";
1212
import { assertNever } from "../../common/helpers-pure";
@@ -163,7 +163,7 @@ export class MethodModelingViewProvider extends AbstractWebviewViewProvider<
163163
}
164164
}
165165

166-
private async revealInModelEditor(method: Method): Promise<void> {
166+
private async revealInModelEditor(method: MethodSignature): Promise<void> {
167167
if (!this.databaseItem) {
168168
return;
169169
}

extensions/ql-vscode/src/model-editor/model-editor-view.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import {
3636
externalApiQueriesProgressMaxStep,
3737
runModelEditorQueries,
3838
} from "./model-editor-queries";
39-
import type { Method } from "./method";
39+
import type { MethodSignature } from "./method";
4040
import type { ModeledMethod } from "./modeled-method";
4141
import type { ExtensionPack } from "./shared/extension-pack";
4242
import type { ModelConfigListener } from "../config";
@@ -431,7 +431,7 @@ export class ModelEditorView extends AbstractWebview<
431431
this.panel?.reveal();
432432
}
433433

434-
public async revealMethod(method: Method): Promise<void> {
434+
public async revealMethod(method: MethodSignature): Promise<void> {
435435
this.panel?.reveal();
436436

437437
await this.postMessage({

extensions/ql-vscode/src/model-editor/modeling-events.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { App } from "../common/app";
22
import { DisposableObject } from "../common/disposable-object";
33
import type { AppEvent, AppEventEmitter } from "../common/events";
44
import type { DatabaseItem } from "../databases/local-databases";
5-
import type { Method, Usage } from "./method";
5+
import type { Method, MethodSignature, Usage } from "./method";
66
import type { ModelEvaluationRun } from "./model-evaluation-run";
77
import type { ModeledMethod } from "./modeled-method";
88
import type { Mode } from "./shared/mode";
@@ -58,7 +58,7 @@ interface ModelEvaluationRunChangedEvent {
5858

5959
interface RevealInModelEditorEvent {
6060
dbUri: string;
61-
method: Method;
61+
method: MethodSignature;
6262
}
6363

6464
interface FocusModelEditorEvent {
@@ -285,7 +285,7 @@ export class ModelingEvents extends DisposableObject {
285285
});
286286
}
287287

288-
public fireRevealInModelEditorEvent(dbUri: string, method: Method) {
288+
public fireRevealInModelEditorEvent(dbUri: string, method: MethodSignature) {
289289
this.onRevealInModelEditorEventEmitter.fire({
290290
dbUri,
291291
method,

0 commit comments

Comments
 (0)