mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
This commit is contained in:
committed by
Jessica Franco
parent
46322caeb1
commit
f71b4a0526
Vendored
+1
-1
@@ -346,7 +346,7 @@ export type ThemedCssFunction<T extends object> = BaseThemedCssFunction<
|
||||
>;
|
||||
|
||||
// Helper type operators
|
||||
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
||||
type Omit<T, K extends keyof T> = T extends any ? Pick<T, Exclude<keyof T, K>> : never;
|
||||
type WithOptionalTheme<P extends { theme?: T }, T> = Omit<P, "theme"> & {
|
||||
theme?: T;
|
||||
};
|
||||
|
||||
@@ -1052,8 +1052,7 @@ function unionTest() {
|
||||
font-size: ${props => props.kind === 'book' ? 16 : 14}
|
||||
`;
|
||||
|
||||
// undesired, fix was reverted because of https://github.com/Microsoft/TypeScript/issues/30663
|
||||
<StyledReadable kind="book" author="Hejlsberg" />; // $ExpectError
|
||||
<StyledReadable kind="book" author="Hejlsberg" />;
|
||||
<StyledReadable kind="magazine" author="Hejlsberg" />; // $ExpectError
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user