fix(styled-system): fix conditionals to make it work with `exactOptionalPropertyTypes: true`
Please fill in this template.
- [x] Use a meaningful title for the pull request. Include the name of the package modified.
- [x] Test the change in your own code. (Compile and run.)
- [ ] ~~Add or edit tests to reflect the change.~~ Tests are as is, but added
exactOptionalPropertyTypes: trueto thetsconfig.json - [x] Follow the advice from the readme.
- [x] Avoid common mistakes.
- [x] Run
pnpm test <package to test>.
Select one of these and delete the others:
If changing an existing definition:
- [x] Provide a URL to documentation or source code which provides context for the suggested changes: https://github.com/system-ui/theme-ui/issues/1919
- [ ] ~~If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the
package.json.~~ Not the case
@yuhr Thank you for submitting this PR!
This is a live comment that I will keep updated.
1 package in this PR
-
styled-system— on npm, on unpkg- owner-approval: @damassi
- Config files to check:
-
styled-system/tsconfig.json: not the expected form and not moving towards it (check:compilerOptions.exactOptionalPropertyTypes)
-
Code Reviews
Because this PR edits the configuration file, it can be merged once it's reviewed by a DT maintainer.
You can test the changes of this PR in the Playground.
Status
- ✅ No merge conflicts
- ✅ Continuous integration tests have passed
- ✅ A DT maintainer needs to approve changes that affect module config files
All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes.
Inactive
This PR has been inactive for 10 days — please merge or say something if there's a problem, otherwise it will be closed!
Diagnostic Information: What the bot saw about this PR
{
"type": "info",
"now": "-",
"pr_number": 71163,
"author": "yuhr",
"headCommitOid": "22fe4ed4c67fcf7510399bc924a359b7229d27b5",
"mergeBaseOid": "596493e061950a549276b2cbce21f273db24cb5b",
"lastPushDate": "2024-11-13T09:59:57.000Z",
"lastActivityDate": "2025-09-19T04:12:21.000Z",
"mergeOfferDate": "2025-09-08T15:40:49.000Z",
"mergeRequestDate": "2025-09-19T04:12:21.000Z",
"mergeRequestUser": "yuhr",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"popularityLevel": "Popular",
"pkgInfo": [
{
"name": "styled-system",
"kind": "edit",
"files": [
{
"path": "types/styled-system/index.d.ts",
"kind": "definition"
},
{
"path": "types/styled-system/tsconfig.json",
"kind": "package-meta",
"suspect": "not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-tsconfigjson) and not moving towards it (check: `compilerOptions.exactOptionalPropertyTypes`)"
}
],
"owners": [
"phobon",
"zephraph",
"damassi",
"alloy",
"maoueh",
"jschuler",
"adam187",
"chrislopresto",
"peduarte",
"Dhalton",
"elliotbonneville",
"jackcaldwell",
"eliseumds",
"craga89",
"HipsterBrown",
"maddhruv",
"cherewaty"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Popular"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "gabritto",
"date": "2025-09-08T15:40:07.000Z",
"isMaintainer": true
},
{
"type": "stale",
"reviewer": "rbuckton",
"date": "2025-01-27T18:55:51.000Z",
"abbrOid": "a833230"
},
{
"type": "approved",
"reviewer": "damassi",
"date": "2025-01-04T17:16:40.000Z",
"isMaintainer": false
}
],
"mainBotCommentID": 2473046840,
"ciResult": "pass"
}
Hey @yuhr,
:unamused: Your PR doesn't modify any tests, so it's hard to know what's being fixed, and your changes might regress in the future. Please consider adding tests to cover the change you're making. Including tests allows this PR to be merged by yourself and the owners of this module.
This can potentially save days of time for you!
🔔 @phobon @zephraph @damassi @alloy @maoueh @jschuler @adam187 @chrislopresto @peduarte @Dhalton @elliotbonneville @jackcaldwell @eliseumds @craga89 @HipsterBrown @maddhruv @cherewaty — please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.
@yuhr One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits. Thank you!
@yuhr I haven't seen any activity on this PR in more than three weeks, and it still has problems that prevent it from being merged. The PR will be closed on Dec 20th (in a week) if the issues aren't addressed.
@rbuckton Hey, could you read my comment? I'm not sure what I should add.
@yuhr I haven't seen any activity on this PR in more than three weeks, and it still has problems that prevent it from being merged. The PR will be closed on Feb 3rd (in a week) if the issues aren't addressed.
I'm not abandoning this.
Oh, sorry I didn't notice you commented. Please ignore the re-review request.
@rbuckton Hi, this ping is a real re-review request; let me know if I'm wrong in the comment
@yuhr I haven't seen any activity on this PR in more than three weeks, and it still has problems that prevent it from being merged. The PR will be closed on Feb 26th (in a week) if the issues aren't addressed.
@rbuckton Could you rereview this?
@yuhr I haven't seen any activity on this PR in more than three weeks, and it still has problems that prevent it from being merged. The PR will be closed on Mar 22nd (in a week) if the issues aren't addressed.
Please merge this. This simply fixes the incompatibility of these packages with exactOptionalPropertyTypes: true.
@yuhr I haven't seen any activity on this PR in more than three weeks, and it still has problems that prevent it from being merged. The PR will be closed on Apr 16th (in a week) if the issues aren't addressed.
Still an issue.
This PR is so painful to watch. @rbuckton can you please merge this? Its been months.
@yuhr I haven't seen any activity on this PR in more than three weeks, and it still has problems that prevent it from being merged. The PR will be closed on Jun 2nd (in a week) if the issues aren't addressed.
Please rereview this... @rbuckton
@yuhr I haven't seen any activity on this PR in more than three weeks, and it still has problems that prevent it from being merged. The PR will be closed on Jun 26th (in a week) if the issues aren't addressed.
Should be merged.
@yuhr I haven't seen any activity on this PR in more than three weeks, and it still has problems that prevent it from being merged. The PR will be closed on Jul 19th (in a week) if the issues aren't addressed.
Why is this still ignored?
@yuhr I haven't seen any activity on this PR in more than three weeks, and it still has problems that prevent it from being merged. The PR will be closed on Aug 13th (in a week) if the issues aren't addressed.
@rbuckton Have you read https://github.com/DefinitelyTyped/DefinitelyTyped/pull/71163#discussion_r1931140313?
Clicking on his profile,
Ex-Senior SDE for TypeScript
So looks like he's off the project
@yuhr I haven't seen any activity on this PR in more than three weeks, and it still has problems that prevent it from being merged. The PR will be closed on Sep 13th (in a week) if the issues aren't addressed.
:hourglass_flowing_sand: Hi @yuhr,
It's been a few days since this PR was approved by gabritto, damassi and we're waiting for a DT maintainer to give a review.
If you would like to short-circuit this wait, you can edit some of the test files in the package that verify how the .d.ts files work. This would allow the PR to be merged by you or the DT module owners after a re-review.
It has been more than two weeks and this PR still has no reviews.
I'll bump it to the DT maintainer queue. Thank you for your patience, @yuhr.
(Ping @phobon, @zephraph, @alloy, @maoueh, @jschuler, @adam187, @chrislopresto, @peduarte, @Dhalton, @elliotbonneville, @jackcaldwell, @eliseumds, @craga89, @HipsterBrown, @maddhruv, @cherewaty.)
@rbuckton Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?