We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fallback values should be readonly to support assigning ["fallback", "values"] as const, e.g.:
readonly
["fallback", "values"] as const
import type { PropertiesFallback as CSSProperties } from "csstype"; export function placeContent< Align extends CSSProperties["alignContent"], Justify extends CSSProperties["justifyContent"] = Align >( align: Align, justify: Justify = (align as unknown) as Justify, ): { alignContent: Align; justifyContent: Justify; } { return { alignContent: align, justifyContent: justify, }; } const longhands = placeContent(["space-around", "space-evenly"] as const); // Type should be inferred as: // { // alignContent: readonly ["space-around", "space-evenly"]; // justifyContent: readonly ["space-around", "space-evenly"]; // }
The text was updated successfully, but these errors were encountered:
Support readonly arrays in fallbacks
ec4a627
Fixes frenic#110
Successfully merging a pull request may close this issue.
Fallback values should be
readonly
to support assigning["fallback", "values"] as const
, e.g.:The text was updated successfully, but these errors were encountered: