GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — rax: fix JSX RaxFragment usage/export by sandersn · Pull Request #70782 · DefinitelyTyped/DefinitelyTyped

Conversation

@sandersn

@sandersn sandersn commented Oct 3, 2024

Copy link
Copy Markdown
Contributor

Typescript 5.7 will fail on uses of <> unless usage of RaxFragment is explicit, with an import of it and a /** @jsxFrag RaxFragment */ pragma at the top of the file. This PR adds that.

RaxFragment also needs to have an exported value. I wasn't sure what to use here so I copied preact, since preact is used in the Typescript handbook as an example:

export const RaxFragment: FunctionComponent<{}>

Notably, though, the preact source has a comment indicating that they're not sure of the correct type either.

Here is the Typescript 5.7 PR that made this error appear:

microsoft/TypeScript#59933

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@sandersn
rax: fix JSX RaxFragment usage/export
136acde
Typescript 5.7 will fail unless usage of RaxFragment is explicit, with
an import of it and a `/** @jsxFrag RaxFragment */` pragma at the top of
the file. This PR adds that.

RaxFragment also needs to have an exported value. I wasn't sure what to
use here so I copied preact, since preact is used in the Typescript
handbook as an example:

```ts
export const RaxFragment: FunctionComponent<{}>
```

Notably, though, the preact source has a comment indicating that
*they're* not sure of the correct type either.

Here is the Typescript 5.7 PR that made this error appear:

microsoft/TypeScript#59933
@typescript-bot

typescript-bot commented Oct 3, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

@sandersn Thank you for submitting this PR!

This is a live comment that I will keep updated.

1 package in this PR

  • rax — on npm, on unpkg

Code Reviews

Because you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it.

You can test the changes of this PR in the Playground.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • 🕐 Most recent commit is approved by type definition owners, DT maintainers or others

Once every item on this list is checked, I'll ask you for permission to merge and publish the changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 70782,
  "author": "sandersn",
  "headCommitOid": "e61f17605e7ac7d1a60228e234217e9db8ecd170",
  "mergeBaseOid": "24a32d6bec7e18c6a426b4ae63b1f2b508874184",
  "lastPushDate": "2024-10-03T20:56:41.000Z",
  "lastActivityDate": "2024-10-03T22:05:08.000Z",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Well-liked by everyone",
  "pkgInfo": [
    {
      "name": "rax",
      "kind": "edit",
      "files": [
        {
          "path": "types/rax/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/rax/test/hooks.tsx",
          "kind": "test"
        }
      ],
      "owners": [
        "solojiang",
        "chenjun1011",
        "imsobear"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Well-liked by everyone"
    }
  ],
  "reviews": [],
  "mainBotCommentID": 2392321623,
  "ciResult": "pass"
}
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@typescript-bot

typescript-bot commented Oct 3, 2024

Copy link
Copy Markdown
Contributor

🔔 @SoloJiang @chenjun1011 @imsobear — 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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@typescript-bot typescript-bot added the The CI failed When GH Actions fails label Oct 3, 2024
@typescript-bot

typescript-bot commented Oct 3, 2024

Copy link
Copy Markdown
Contributor

@sandersn The CI build failed! Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

Note: builds that are failing do not end up on the list of PRs for the DT maintainers to review.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sandersn
Disable jsx lint rule
e61f176
Though perhaps `@jsxFrag` should be allowed by the rule.
@typescript-bot typescript-bot removed the The CI failed When GH Actions fails label Oct 3, 2024
@DangerBotOSS

DangerBotOSS commented Oct 3, 2024

Copy link
Copy Markdown

Formatting

The following files are not formatted:

  1. types/rax/test/hooks.tsx
  2. types/rax/index.d.ts

Consider running pnpm dprint fmt on these files to make review easier.

Generated by 🚫 dangerJS against e61f176

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sandersn
sandersn merged commit 4b7df4b into DefinitelyTyped:master Oct 9, 2024
alino20 pushed a commit to alino20/DefinitelyTyped that referenced this pull request Dec 31, 2024
@sandersn @alino20
rax: fix JSX RaxFragment usage/export (DefinitelyTyped#70782)
4162425
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@sandersn @typescript-bot @DangerBotOSS
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.