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

Register binding when transforming TSParameterProperty #12796

Merged
merged 3 commits into from Feb 16, 2021

Conversation

JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Feb 12, 2021

Q                       A
Fixed Issues? Fixes #11061
Patch: Bug Fix? Y
Tests Added + Pass? Yes
License MIT

Although the issue #11061 is triggered from

const localBinding = path.scope.getBinding(localName);
const rootBinding = scope.getBinding(localName);
// redeclared in this scope
if (rootBinding !== localBinding) return;
const importData = imported.get(localName);
if (importData) {

where both the local binding and root binding of message is undefined and therefore replaced by firebaseAdmin.messging, it should be fixed in transform-typescript when we transform TSParameterProperty to general function parameters.

I don't think the root binding of message should be undefined, too. But I prefer to fix that in another PR.

@JLHwung JLHwung added PR: Bug Fix 🐛 A type of pull request used for our changelog categories area: typescript labels Feb 12, 2021
@codesandbox-ci
Copy link

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 fe85363:

Sandbox Source
babel-repl-custom-plugin Configuration
babel-plugin-multi-config Configuration

@babel-bot
Copy link
Collaborator

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: typescript outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Bug Fix 🐛 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wrong js code when using ts constructor assignment
4 participants