sdk tweaks (#2791)

* sdk tweaks

* switch back to deeppartial
This commit is contained in:
Aiden McClelland
2024-11-25 11:49:11 -07:00
committed by GitHub
parent e4a2af6ae7
commit 504f1a8e97
18 changed files with 149 additions and 106 deletions

View File

@@ -29,27 +29,6 @@ export type UnionRes<
}
}[K]
export type PartialUnionRes<
Store,
VariantValues extends {
[K in string]: {
name: string
spec: InputSpec<any, Store> | InputSpec<any, never>
}
},
K extends keyof VariantValues & string = keyof VariantValues & string,
> = {
[key in keyof VariantValues]: {
selection?: key
value?: ExtractPartialInputSpecType<VariantValues[key]["spec"]>
other?: {
[key2 in Exclude<keyof VariantValues & string, key>]?: DeepPartial<
ExtractInputSpecType<VariantValues[key2]["spec"]>
>
}
}
}[K]
/**
* Used in the the Value.select { @link './value.ts' }
* to indicate the type of select variants that are available. The key for the record passed in will be the