Skip to content

Emit only instance members from global polluters #1910

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

Merged
merged 1 commit into from
Feb 12, 2025

Conversation

zombie
Copy link
Contributor

@zombie zombie commented Feb 9, 2025

I believe this is correct, static members from global polluters shouldn't show up as globals.

Copy link
Contributor

github-actions bot commented Feb 9, 2025

Thanks for the PR!

This section of the codebase is owned by @saschanaz - if they write a comment saying "LGTM" then it will be merged.

@zombie
Copy link
Contributor Author

zombie commented Feb 9, 2025

I tried looking in inputfiles/, but I don't really understand where this difference from baselines is coming from.

    -/** @deprecated */
    -declare const name: void;
    +declare var name: string;

Copy link
Contributor

@saschanaz saschanaz left a comment

Choose a reason for hiding this comment

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

It's special cased here:

if (
p.name === "name" &&
i.name === "Window" &&
emitScope === EmitScope.All
) {
printer.printLine("/** @deprecated */");
printer.printLine("declare const name: void;");
} else {

Changing that should fix the failure.

(But Gecko has static member in global interfaces? 🤔🤔🤔 / Edit: Oh, isInstance, yeah.)

@zombie
Copy link
Contributor Author

zombie commented Feb 12, 2025

It's special cased here:

Thanks, I had a feeling I was looking in the wrong places.

@saschanaz
Copy link
Contributor

LGTM, thanks!

@github-actions github-actions bot merged commit 85485f9 into microsoft:main Feb 12, 2025
4 checks passed
Copy link
Contributor

Merging because @saschanaz is a code-owner of all the changes - thanks!

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.

2 participants