ProjectUntaggedConstants<MUCs, Map>:ShallowResolve<{[ K in InferUnion<MUCs> | keyof Map]: K extends keyof Map & InferUnion<MUCs> ? Map[K] : never}>
Given a record type containing only untagged PropertyKeys and a type which uses the properties' types of the first as keys, forces the latter to use ALL AND ONLY the properties' types of the first as keys
Returns
The Map if it satisfies the requirement, otherwise a projection which uses the properties' types of the first as keys but containing never as properties's type for both extraneous properties (properties of Map missing as properties' types of MUCs) and missing ones (properties' types of MUCs missing in Map)
Given a record type containing only untagged PropertyKeys and a type which uses the properties' types of the first as keys, forces the latter to use ALL AND ONLY the properties' types of the first as keys
Returns
The Map if it satisfies the requirement, otherwise a projection which uses the properties' types of the first as keys but containing never as properties's type for both extraneous properties (properties of Map missing as properties' types of MUCs) and missing ones (properties' types of MUCs missing in Map)
Example
is
Example
results in an error because "B" is missing as key into the Map type
Example
results in an error because "C" is an extraneous key