fix(editor): Fix type errors for various utils files (no-changelog) (#9480)

This commit is contained in:
Alex Grozav
2024-05-22 07:54:55 +03:00
committed by GitHub
parent eef5479e96
commit 0cb977bf2f
16 changed files with 167 additions and 165 deletions

View File

@@ -14,6 +14,7 @@ import { uuid } from '@jsplumb/util';
import { defaultMockNodeTypes } from '@/__tests__/defaults';
import type { INodeUi, ITag, IUsedCredential, IWorkflowDb, WorkflowMetadata } from '@/Interface';
import type { ProjectSharingData } from '@/features/projects/projects.types';
import type { RouteLocationNormalized } from 'vue-router';
export function createTestNodeTypes(data: INodeTypeData = {}): INodeTypes {
const getResolvedKey = (key: string) => {
@@ -103,3 +104,27 @@ export function createTestNode(
...node,
};
}
export function createTestRouteLocation({
path = '',
params = {},
fullPath = path,
hash = '',
matched = [],
redirectedFrom = undefined,
name = path,
meta = {},
query = {},
}: Partial<RouteLocationNormalized> = {}): RouteLocationNormalized {
return {
path,
params,
fullPath,
hash,
matched,
redirectedFrom,
name,
meta,
query,
};
}