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

feat(react): Add unstable_useOpaqueIdentifier #46692

Merged

Conversation

eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented Aug 12, 2020

Please fill in this template.

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code. (Compile and run.)
  • Add or edit tests to reflect the change. (Run with npm test.)
  • Follow the advice from the readme.
  • Avoid common mistakes.
  • Run npm run lint package-name (or tsc if no tslint.json is present).

Select one of these and delete the others:

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes:
  • [ ] If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the header.
  • Include tests for your changes
  • [ ] If you are making substantial changes, consider adding a tslint.json containing { "extends": "dtslint/dt.json" }. If for reason the any rule need to be disabled, disable it for that line using // tslint:disable-next-line [ruleName] and not for whole package so that the need for disabling can be reviewed.

@typescript-bot
Copy link
Contributor

typescript-bot commented Aug 12, 2020

@eps1lon Thank you for submitting this PR!

This is a live comment which I will keep updated.

1 package in this PR

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.

Status

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

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.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 46692,
  "author": "eps1lon",
  "owners": [
    "johnnyreilly",
    "bbenezech",
    "pzavolinsky",
    "digiguru",
    "ericanderson",
    "DovydasNavickas",
    "theruther4d",
    "guilhermehubner",
    "ferdaber",
    "jrakotoharisoa",
    "pascaloliv",
    "hotell",
    "franklixuefei",
    "Jessidhia",
    "saranshkataria",
    "lukyth",
    "eps1lon",
    "zieka",
    "dancerphil",
    "dimitropoulos",
    "disjukr",
    "vhfmag",
    "hellatan"
  ],
  "dangerLevel": "ScopedAndTested",
  "headCommitAbbrOid": "9066a7d",
  "headCommitOid": "9066a7dc590dfd5072a5c8c13bf6981034925cde",
  "mergeIsRequested": false,
  "stalenessInDays": 0,
  "lastPushDate": "2020-08-31T07:56:29.000Z",
  "lastCommentDate": "2020-08-31T07:56:59.000Z",
  "maintainerBlessed": true,
  "reviewLink": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/46692/files",
  "hasMergeConflict": false,
  "authorIsOwner": true,
  "isFirstContribution": false,
  "popularityLevel": "Critical",
  "newPackages": [],
  "packages": [
    "react"
  ],
  "files": [
    {
      "path": "types/react/experimental.d.ts",
      "kind": "definition",
      "package": "react"
    },
    {
      "path": "types/react/test/experimental.tsx",
      "kind": "test",
      "package": "react"
    }
  ],
  "hasDismissedReview": false,
  "ciResult": "pass",
  "lastReviewDate": "2020-08-31T14:21:49.000Z",
  "reviewersWithStaleReviews": [],
  "approvalFlags": 2,
  "isChangesRequested": false
}

@typescript-bot
Copy link
Contributor

🔔 @johnnyreilly @bbenezech @pzavolinsky @digiguru @ericanderson @DovydasNavickas @theruther4d @guilhermehubner @ferdaber @jrakotoharisoa @pascaloliv @Hotell @franklixuefei @Jessidhia @saranshkataria @lukyth @zieka @dancerphil @dimitropoulos @disjukr @vhfmag @hellatan — 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.

@typescript-bot typescript-bot added Critical package Author is Owner The author of this PR is a listed owner of the package. labels Aug 12, 2020
@typescript-bot typescript-bot added this to Needs Maintainer Review in New Pull Request Status Board Aug 12, 2020
@typescript-bot
Copy link
Contributor

👋 Hi there! I’ve run some quick measurements against master and your PR. These metrics should help the humans reviewing this PR gauge whether it might negatively affect compile times or editor responsiveness for users who install these typings.

Let’s review the numbers, shall we?

Comparison details 📊
master #46692 diff
Batch compilation
Memory usage (MiB) 129.6 131.8 +1.7%
Type count 35619 35642 0%
Assignability cache size 8532 8558 0%
Language service
Samples taken 2313 2313 0%
Identifiers in tests 2851 2873 +1%
getCompletionsAtPosition
    Mean duration (ms) 321.8 321.8 0.0%
    Mean CV 8.0% 8.0%
    Worst duration (ms) 1237.4 1180.4 -4.6%
    Worst identifier x props
getQuickInfoAtPosition
    Mean duration (ms) 319.4 319.5 0.0%
    Mean CV 8.1% 8.2% +1.0%
    Worst duration (ms) 1009.2 1039.3 +3.0%
    Worst identifier ref ref

It looks like nothing changed too much. I won’t post performance data again unless it gets worse.

@typescript-bot typescript-bot added the Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. label Aug 12, 2020
@andrewbranch andrewbranch moved this from Needs Maintainer Review to Waiting for Code Reviews in New Pull Request Status Board Aug 13, 2020
@typescript-bot typescript-bot added the Unmerged The author did not merge the PR when it was ready. label Aug 22, 2020
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Action in New Pull Request Status Board Aug 22, 2020
@typescript-bot typescript-bot removed the Unmerged The author did not merge the PR when it was ready. label Aug 27, 2020
@typescript-bot typescript-bot moved this from Needs Maintainer Action to Waiting for Code Reviews in New Pull Request Status Board Aug 27, 2020
@typescript-bot typescript-bot added the Unmerged The author did not merge the PR when it was ready. label Aug 28, 2020
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Action in New Pull Request Status Board Aug 28, 2020
@typescript-bot typescript-bot removed the Unmerged The author did not merge the PR when it was ready. label Aug 28, 2020
@typescript-bot typescript-bot moved this from Needs Maintainer Action to Waiting for Code Reviews in New Pull Request Status Board Aug 28, 2020
Copy link
Contributor

@ferdaber ferdaber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this makes sense. Just FYI that I believe branding symbols automatically get exported out regardless of modifiers in order for the compiler to actually work, so consumers will have access to the unique symbol even though there’s no export declaration on it.

@typescript-bot typescript-bot added Owner Approved A listed owner of this package signed off on the pull request. Self Merge This PR can now be self-merged by the PR author or an owner labels Aug 30, 2020
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Waiting for Author to Merge in New Pull Request Status Board Aug 30, 2020
@eps1lon
Copy link
Collaborator Author

eps1lon commented Aug 31, 2020

Just FYI that I believe branding symbols automatically get exported out regardless of modifiers in order for the compiler to actually work, so consumers will have access to the unique symbol even though there’s no export declaration on it.

Added an additional guard: 9066a7d

@typescript-bot typescript-bot removed Self Merge This PR can now be self-merged by the PR author or an owner Owner Approved A listed owner of this package signed off on the pull request. labels Aug 31, 2020
@typescript-bot typescript-bot moved this from Waiting for Author to Merge to Waiting for Code Reviews in New Pull Request Status Board Aug 31, 2020
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board Aug 31, 2020
@typescript-bot
Copy link
Contributor

@ferdaber 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?

@elibarzilay elibarzilay moved this from Needs Maintainer Review to Waiting for Code Reviews in New Pull Request Status Board Aug 31, 2020
@typescript-bot typescript-bot added Owner Approved A listed owner of this package signed off on the pull request. Self Merge This PR can now be self-merged by the PR author or an owner labels Aug 31, 2020
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Waiting for Author to Merge in New Pull Request Status Board Aug 31, 2020
@johnnyreilly johnnyreilly merged commit 17a745f into DefinitelyTyped:master Aug 31, 2020
@typescript-bot typescript-bot removed this from Waiting for Author to Merge in New Pull Request Status Board Aug 31, 2020
@typescript-bot
Copy link
Contributor

I just published @types/react@16.9.49 to npm.

chivesrs pushed a commit to chivesrs/DefinitelyTyped that referenced this pull request Sep 2, 2020
* test(react): Add expected behavior for useOpaqueIdentifier

* feat(react): Add unstable_useOpaqueIdentifier

* Update types/react/experimental.d.ts
danielrearden pushed a commit to danielrearden/DefinitelyTyped that referenced this pull request Sep 22, 2020
* test(react): Add expected behavior for useOpaqueIdentifier

* feat(react): Add unstable_useOpaqueIdentifier

* Update types/react/experimental.d.ts
@eps1lon eps1lon deleted the feat/react/useOpaqueIdentifier branch October 20, 2020 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author is Owner The author of this PR is a listed owner of the package. Critical package Owner Approved A listed owner of this package signed off on the pull request. Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. Self Merge This PR can now be self-merged by the PR author or an owner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants