Skip to content

Make readonly arrays accepted by cx()#2276

Open
garronej wants to merge 1 commit intoemotion-js:mainfrom
garronej:loosen_arrays
Open

Make readonly arrays accepted by cx()#2276
garronej wants to merge 1 commit intoemotion-js:mainfrom
garronej:loosen_arrays

Conversation

@garronej
Copy link
Contributor

@garronej garronej commented Mar 5, 2021

I changed the type definitions of ArrayClassNamesArg that defines what the cx() function can accept as argument.

Because:

image

cx is pure, the array passed will never be edited.

Using ReadonlyArray instead or Array

Checklist:

  • Documentation N/A
  • Tests
  • Code complete
  • Changeset

Thank you for your amazing work.

@changeset-bot
Copy link

changeset-bot bot commented Mar 5, 2021

⚠️ No Changeset found

Latest commit: a0b68ab

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 5, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit a0b68ab:

Sandbox Source
Emotion Configuration

@garronej
Copy link
Contributor Author

up?

@Andarist
Copy link
Member

This one has already been changed in #2057 but I lost track of this PR. I've revived it here: #2295 . Unfortunately, it's failing our type tests right now - I need to investigate it. If you help out with this - I would highly appreciate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants