Skip to content

Emit only instance members from global polluters#1910

Merged
github-actions[bot] merged 1 commit into
microsoft:mainfrom
zombie:patch-2
Feb 12, 2025
Merged

Emit only instance members from global polluters#1910
github-actions[bot] merged 1 commit into
microsoft:mainfrom
zombie:patch-2

Conversation

@zombie

@zombie zombie commented Feb 9, 2025

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Feb 9, 2025

Copy link
Copy Markdown
Contributor

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

zombie commented Feb 9, 2025

Copy link
Copy Markdown
Contributor Author

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;

@saschanaz saschanaz left a comment

Copy link
Copy Markdown
Contributor

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

zombie commented Feb 12, 2025

Copy link
Copy Markdown
Contributor Author

It's special cased here:

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

@saschanaz

Copy link
Copy Markdown
Contributor

LGTM, thanks!

@github-actions github-actions Bot merged commit 85485f9 into microsoft:main Feb 12, 2025
@github-actions

Copy link
Copy Markdown
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