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

[helpers TS conversion] subclasses #16578

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

amjed-98
Copy link
Contributor

Q                       A
Fixed Issues? Fixes part of #16500
Patch: Bug Fix? No
Major: Breaking Change? No
Minor: New Feature? No
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes? No
License MIT

Migrate subclasses helpers to typescript (callSuper, inherits, inheritsLoose, isNativeFunction, wrapNativeSuper)

@amjed-98 amjed-98 changed the title Migrate super classes helpers [helpers TS conversion] subclasses Jun 20, 2024
@babel-bot
Copy link
Collaborator

babel-bot commented Jun 20, 2024

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/57232

Copy link
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Contributor

@JLHwung JLHwung left a comment

Choose a reason for hiding this comment

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

Thanks.

function Wrapper() {
// @ts-expect-error -- where are sure Class is a function here
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// @ts-expect-error -- where are sure Class is a function here
// @ts-expect-error -- we are sure Class is a function here

var _cache = typeof Map === "function" ? new Map() : undefined;

_wrapNativeSuper = function _wrapNativeSuper(Class) {
// @ts-expect-error -- test
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// @ts-expect-error -- test
// @ts-expect-error -- reuse function id for helper size

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.

None yet

5 participants