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
Goal
In #299, the
type_as_infer
(now calledreplace_underscore
) function doesn't handle a typeType::Path(TypePath { qself: Some(_), .. })
due to a match onNone
for theqself
field, this PR is a quick fix for thatThis allows the following use of
as
:Changes
Removed the match on
qself: None
and calledreplace_underscore
onqself.ty
Checklist