Comments (1)
This bug goes away when removing the generic from CSS.Properties
, fixing in #1640
export default function cssMap<
- TStyles extends Record<string, CSS.Properties<number | string> & WhitelistedSelector & ExtendedSelectors>
+ TStyles extends Record<string, CSS.Properties & WhitelistedSelector & ExtendedSelectors>
+ TStyles extends Record<string, CSS.Properties<(string & {}) | 0> & WhitelistedSelector & ExtendedSelectors> // default
+ TStyles extends Record<string, CSS.Properties<(string & {}) | number> & WhitelistedSelector & ExtendedSelectors> // what we should use?
>(
Can't tell you why, not sure I really understand what TLength
is doing in the csstype package.
However, I can't find a way to infer the number, even CSS.Properties<(string & {}) | (number & {})>
doesn't work:
from compiled.
Related Issues (20)
- Fails silently when Compiled APIs are used as values in style attribute
- Using object property (imported from CommonJS / CJS package) as media query results in failed build
- When using an object property in a media query, `as const` in the object definition causes build to fail
- Properties fall-through to wrapped DOM element when there are default values in the property declaration
- Types on `css={…}` don't block using the top-level object from `cssMap()` HOT 1
- Styles are lost after composing styled component and then using `as` prop HOT 1
- Passing a `css` output as a value to another `css` call fails with no type error (etc)
- Object syntax creates unnecessary quotes when using properties like `content: ''`, resulting in style not being applied
- Using css variables in style declarations are always converted to kebab-case
- Cannot import @compiled/utils from within @compiled/jest source code
- @compiled/jest toHaveCompiledCss does not support advanced uses of ampersand
- Keyframes cannot be declared in template literals HOT 2
- keyframes in css function call in ternary operator not supported HOT 1
- RFC: Typed CSS variable API HOT 1
- Remove unused Compiled options
- Update eslint-plugin to include full list of eslint rules
- Apply single default for `extensions` across `@compiled/babel-plugin`, `@compiled/webpack-loader` and `@compiled/parcel-transformer`
- cssMap errors out if css key is MemberExpression
- Babel plugin can't be used in a TS monorepo before building the code HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from compiled.