BridgeJS: Allow extensions to contain types - #803
Merged
Conversation
Contributor
Author
|
I’ve pushed a commit to fix an existing .d.ts code-generation issue that the new tests triggered. |
MaxDesiatov
requested review from
kateinoigakukun and
krodak
and removed request for
krodak
August 14, 2026 14:07
krodak
reviewed
Aug 15, 2026
| } | ||
| if let components = qualifiedComponents(from: type) { | ||
| if let components = type.qualifiedComponents { | ||
| return lookupType(fullyQualified: components) |
Member
There was a problem hiding this comment.
FYI, extension scoping now handles unqualified names, but relative qualified names such as Shelf.Divider are still treated as root-qualified. An @JS method using that spelling is omitted from the skeleton instead of resolving it as Library.Shelf.Divider.
This behavior already exists before this PR, so I opened #805 to follow it separately rather than treating it as part of this change.
wfltaylor
force-pushed
the
extension-types
branch
from
August 17, 2026 02:59
779553d to
ae935a9
Compare
krodak
approved these changes
Aug 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, you can write this:
but not this (which actually emitted broken generated code):
This PR removes this limitation, so you can define
@JStypes in extensions.