Skip to content
New issue

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

Incorrect values for properties are allowed #3140

Open
Cerber-Ursi opened this issue Dec 15, 2023 · 0 comments
Open

Incorrect values for properties are allowed #3140

Cerber-Ursi opened this issue Dec 15, 2023 · 0 comments

Comments

@Cerber-Ursi
Copy link
Contributor

Current behavior:

emotion's CssObject type allows for incorrect property values.

To reproduce:

This error was actually found by bumping csstypes dependency and running dtslint on @emotion/serialize package, so the reproduction is already there; minimized:

import { CSSObject } from '@emotion/serialize'
const cssObject: CSSObject = { fontWeight: 'wrong' }

With csstypes@3.1.2, this compiles successfully.

Expected behavior:

With csstypes@3.0.2, i.e. the minimal version required by @emotion/serialize, this code errors as expected.

Environment information:

  • @emotion/react version: current main branch at the moment of issue creation, i.e. commit 1c6031.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant