(
input: U & { type: T },
)
| 107 | >["config"]; |
| 108 | |
| 109 | export const typedNode = < |
| 110 | T extends NodeType, |
| 111 | U extends { config: Prisma.JsonValue | object }, |
| 112 | C extends InferNodeConfig<T>, |
| 113 | >( |
| 114 | input: U & { type: T }, |
| 115 | ): Omit<U, "config"> & { config: C } => ({ |
| 116 | ...input, |
| 117 | config: nodeSchema.parse(input).config as C, |
| 118 | }); |
no outgoing calls
no test coverage detected