Skip to content

Conversation

@Bashamega
Copy link
Contributor

This PR introduces a reusable generic utility type, Globalized, to model environments where a scoped global (such as WorkerGlobalScope) is augmented with globalThis.
This will allow us to use type instead of override type when using it in KDL or JSONc

@github-actions
Copy link
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.

@jakebailey
Copy link
Member

I don't think we should just be adding random global types like this that aren't from a spec; this seems like it's just the same code but not inlined?

@Bashamega
Copy link
Contributor Author

Bashamega commented Dec 31, 2025

We already created a similar type in #2338 for SelectionDirection

@jakebailey
Copy link
Member

That's totally different,no?

@Bashamega
Copy link
Contributor Author

That's totally different,no?

I think no, I think this is just using the DRY method like that pr

@saschanaz
Copy link
Collaborator

Adding string enum is OK-ish as users may want to use the same definition without repeating, but in this case it's unlikely that users would ever do this manually.

@Bashamega
Copy link
Contributor Author

Understood @saschanaz

@Bashamega Bashamega closed this Dec 31, 2025
@saschanaz saschanaz deleted the globalized branch December 31, 2025 10:21
@saschanaz
Copy link
Collaborator

(also the spec would use string enum if it was added in 2025; it does not because it's added back in the old days when it wasn't using Web IDL and doing so now would cause potential webcompat issue because of order of exception)

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.

3 participants