-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
DuplicateAn existing issue was already createdAn existing issue was already created
Description
TypeScript Version: 2.2.2
Code
interface Css {
position: 'absolute' | 'relative';
}
function style(rules: Css) { }
const rules = { position: 'absolute' };
style(rules);
style({ position: 'absolute' });
Expected behavior:
There should be no type issues.
Actual behavior:
style(rules)
yields
Argument of type '{ position: string; }' is not assignable to parameter of type 'Css'
Types of property 'position' are incompatible
Using style({position: 'absolute'})
works fine.
dlants, niieani, KiaraGrouwstra, msepahvand, nevir and 2 more
Metadata
Metadata
Assignees
Labels
DuplicateAn existing issue was already createdAn existing issue was already created