Skip to content

Conversation

nikeokoronkwo
Copy link
Collaborator

@nikeokoronkwo nikeokoronkwo commented Aug 25, 2025

This PR makes a couple of fixes to the web-generator, as well as some minor additions to previous features

  • Improved exception for not finding type
  • Resolved def if cannot find file in path/module (i.e maybe a module already resolved by ts/node)
  • Added support for typedef in namespaces

- improved exception for not finding type
- resolved def if cannot find file in path/module (i.e maybe a module already resolved by ts/node)
Copy link
Contributor

@srujzs srujzs left a comment

Choose a reason for hiding this comment

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

I'd add a test for this as well when you're ready.

@nikeokoronkwo nikeokoronkwo requested a review from srujzs August 31, 2025 02:07
@nikeokoronkwo
Copy link
Collaborator Author

nikeokoronkwo commented Aug 31, 2025

Ready now. @types/uuid now works!

name: name,
dartName: dartName,
id: id,
exported: isExported,
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI, we may have talked about this before but this is for supporting properties that aren't strictly identifiers in JS interop: https://dart-review.googlesource.com/c/sdk/+/447964. This would allow things like @JS('foo-bar').

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Affirmative, although this may not help/work with symbol indexing. Would this work for number indexes as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Just to reference the issue: dart-lang/sdk#61413

@srujzs
Copy link
Contributor

srujzs commented Sep 2, 2025

I think we still need a test for a typedef in a namespace unless that was the test expectation that got updated?

@nikeokoronkwo nikeokoronkwo merged commit a152054 into dart-lang:main Sep 4, 2025
16 of 18 checks passed
@nikeokoronkwo nikeokoronkwo deleted the fix/namespace-def-res branch September 4, 2025 00:58
copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Sep 4, 2025
Revisions updated by `dart tools/rev_sdk_deps.dart`.

ecosystem (https://github.com/dart-lang/ecosystem/compare/d6370fb..36e514d):
  36e514d  2025-09-02  dependabot[bot]  Bump the github-actions group with 4 updates (dart-lang/ecosystem#368)
  7c783fa  2025-09-02  Devon Carew  update to the latest analyzer (dart-lang/ecosystem#369)

web (https://github.com/dart-lang/web/compare/bdab462..a152054):
  a152054  2025-09-03  Nikechukwu  [interop] Resolved Namespace `typedef` and exception improvements (dart-lang/web#459)

webdev (https://github.com/dart-lang/webdev/compare/bf7b1e5..52ad019):
  52ad0191  2025-09-03  jensjoha  Fix failing test ('NoSuchAlertException (27): no such alert') after `#2681` (dart-lang/webdev#2683)

Change-Id: Ib708d6855f0aa2b6502137526f798a3780fa3048
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/448420
Reviewed-by: Nate Bosch <[email protected]>
Commit-Queue: Devon Carew <[email protected]>
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