Closed yokiijay closed 3 years ago
Solution
This can be fixed (or rather, worked around) by intersecting string
with another type.
export type JustifyContentProperty = Globals | ContentDistribution | ContentPosition | "left" | "normal" | "right" | (string & {});
Demo
Source
Originally suggested in https://github.com/microsoft/TypeScript/issues/29729#issuecomment-460346421.
Considerations
string
.Tks alot. Still wonder:
type
keyword are not augmentable. There is no non-invasive way to alter them. They need to be changed upstream.csstype
. patch-package
allows you to do just that.Again, thank yo so much.
Here is the code
The type is:
export type JustifyContentProperty = Globals | ContentDistribution | ContentPosition | "left" | "normal" | "right" | string;
Question
Tks~