mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): replace type-fest
with utility-types
- The new package has more useful types - Only used `JsonObject` from `type-fest`; added an implementation of that type
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import type { JSONObject } from 'common/types';
|
||||
import type { CoreMetadataInvocation, NonNullableGraph } from 'services/api/types';
|
||||
import type { JsonObject } from 'type-fest';
|
||||
|
||||
import { METADATA } from './constants';
|
||||
|
||||
@ -30,7 +30,7 @@ export const addCoreMetadataNode = (
|
||||
|
||||
export const upsertMetadata = (
|
||||
graph: NonNullableGraph,
|
||||
metadata: Partial<CoreMetadataInvocation> | JsonObject
|
||||
metadata: Partial<CoreMetadataInvocation> | JSONObject
|
||||
): void => {
|
||||
const metadataNode = graph.nodes[METADATA] as CoreMetadataInvocation | undefined;
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
import type { JSONObject } from 'common/types';
|
||||
import { parseify } from 'common/util/serialize';
|
||||
import type { InvocationTemplate } from 'features/nodes/types/invocation';
|
||||
import type { WorkflowV3 } from 'features/nodes/types/workflow';
|
||||
@ -5,14 +6,13 @@ import { isWorkflowInvocationNode } from 'features/nodes/types/workflow';
|
||||
import { getNeedsUpdate } from 'features/nodes/util/node/nodeUpdate';
|
||||
import { t } from 'i18next';
|
||||
import { keyBy } from 'lodash-es';
|
||||
import type { JsonObject } from 'type-fest';
|
||||
|
||||
import { parseAndMigrateWorkflow } from './migrations';
|
||||
|
||||
type WorkflowWarning = {
|
||||
message: string;
|
||||
issues?: string[];
|
||||
data: JsonObject;
|
||||
data: JSONObject;
|
||||
};
|
||||
|
||||
type ValidateWorkflowResult = {
|
||||
|
Reference in New Issue
Block a user