Skip to content

0.13.0 Broken defineVars type check #1069

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

Open
abrcdf1023 opened this issue May 20, 2025 · 0 comments
Open

0.13.0 Broken defineVars type check #1069

abrcdf1023 opened this issue May 20, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@abrcdf1023
Copy link

abrcdf1023 commented May 20, 2025

Describe the issue

defineVars type check broken when use number

Image

Expected behavior

Should not broken type check

Steps to reproduce

Just definVar with number value

import * as stylex from '@stylexjs/stylex'
import { type VarGroup } from '@stylexjs/stylex'

export type ZIndex = Readonly<{
  appBar: number,
  drawer: number,
  backdrop: number,
  fab: number,
  mobileStepper: number,
  modal: number,
  snackbar: number,
  speedDial: number,
  tooltip: number,
}>

export const zIndex: VarGroup<ZIndex> = stylex.defineVars({
  appBar: 1100,
  drawer: 1200,
  backdrop: 1201,
  fab: 1050,
  mobileStepper: 1000,
  modal: 1300,
  snackbar: 1400,
  speedDial: 1050,
  tooltip: 1500,
})

Test case

No response

Additional comments

No response

@abrcdf1023 abrcdf1023 added the bug Something isn't working label May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant