Skip to content
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

Fix missing case in #299 #310

Merged
merged 1 commit into from
Apr 18, 2024
Merged

Conversation

escritorio-gustavo
Copy link
Contributor

@escritorio-gustavo escritorio-gustavo commented Apr 18, 2024

Goal

In #299, the type_as_infer (now called replace_underscore) function doesn't handle a type Type::Path(TypePath { qself: Some(_), .. }) due to a match on None for the qself field, this PR is a quick fix for that

This allows the following use of as:

#[ts(as = "<_ as Bar>::Baz")]
foo: String

Changes

Removed the match on qself: None and called replace_underscore on qself.ty

Checklist

  • I have followed the steps listed in the Contributing guide.
  • If necessary, I have added documentation related to the changes made.
  • I have added or updated the tests related to the changes made.

@escritorio-gustavo escritorio-gustavo merged commit d122373 into main Apr 18, 2024
14 checks passed
@escritorio-gustavo escritorio-gustavo deleted the replace_underscore_qself branch April 18, 2024 12:25
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.

1 participant