Remove provenance from none modeling

This commit is contained in:
Koen Vlaswinkel
2023-11-01 15:58:42 +01:00
parent dd8d7dfd58
commit ab67060279
7 changed files with 5 additions and 18 deletions

View File

@@ -36,7 +36,6 @@ function createEmptyNoneModeledMethod(
return {
...methodSignature,
type: "none",
provenance: "manual",
};
}

View File

@@ -21,8 +21,6 @@ export type Provenance =
export interface NoneModeledMethod extends MethodSignature {
readonly type: "none";
// Provenance is always propagated
readonly provenance: Provenance;
}
export interface SourceModeledMethod extends MethodSignature {

View File

@@ -37,7 +37,6 @@ function canonicalizeModeledMethod(
return {
...methodSignature,
type: "none",
provenance: "manual",
};
case "source":
return {

View File

@@ -13,6 +13,7 @@ import { Codicon } from "../common";
import { validateModeledMethods } from "../../model-editor/shared/validation";
import { ModeledMethodAlert } from "./ModeledMethodAlert";
import { QueryLanguage } from "../../common/query-language";
import { createEmptyModeledMethod } from "../../model-editor/modeled-method-empty";
export type MultipleModeledMethodsPanelProps = {
language: QueryLanguage;
@@ -92,15 +93,10 @@ export const MultipleModeledMethodsPanel = ({
);
const handleAddClick = useCallback(() => {
const newModeledMethod: ModeledMethod = {
type: "none",
provenance: "manual",
signature: method.signature,
packageName: method.packageName,
typeName: method.typeName,
methodName: method.methodName,
methodParameters: method.methodParameters,
};
const newModeledMethod: ModeledMethod = createEmptyModeledMethod(
"none",
method,
);
const newModeledMethods = [...modeledMethods, newModeledMethod];

View File

@@ -167,7 +167,6 @@ describe(MultipleModeledMethodsPanel.name, () => {
methodName: method.methodName,
methodParameters: method.methodParameters,
type: "none",
provenance: "manual",
},
]);
});
@@ -437,7 +436,6 @@ describe(MultipleModeledMethodsPanel.name, () => {
methodName: method.methodName,
methodParameters: method.methodParameters,
type: "none",
provenance: "manual",
},
]);
});
@@ -799,7 +797,6 @@ describe(MultipleModeledMethodsPanel.name, () => {
methodName: method.methodName,
methodParameters: method.methodParameters,
type: "none",
provenance: "manual",
},
]);
});

View File

@@ -366,7 +366,6 @@ describe(MethodRow.name, () => {
modeledMethod,
{
type: "none",
provenance: "manual",
signature: method.signature,
packageName: method.packageName,
typeName: method.typeName,

View File

@@ -27,7 +27,6 @@ export function createNoneModeledMethod(
return {
...createMethodSignature(),
type: "none",
provenance: "manual",
...data,
};
}