* Add inference priority for mapped type keys The new priority causes union inference, similarly to return type * Rename priority * Fix comment typo
21 lines
361 B
TypeScript
21 lines
361 B
TypeScript
interface Style {
|
|
flashy: any;
|
|
}
|
|
|
|
declare function mergeStyleSets<K extends string>(
|
|
...cssSets: { [P in K]?: Style }[]): { [P in K]: Style };
|
|
|
|
// Expected:
|
|
// let x: {
|
|
// a: Style;
|
|
// b: Style;
|
|
// }
|
|
let x = mergeStyleSets(
|
|
{},
|
|
{
|
|
a: { flashy: true },
|
|
},
|
|
{
|
|
b: { flashy: true },
|
|
},
|
|
) |