IntelliSense autocomplete not showing up exclusively for Sapphire classes?
When trying to extend
Command
class, as well as other classes like Listener
, IntelliSense autocomplete seems not to work in the class definition? Originally, when pressing CTRL + SPACE
should show the extended class methods & properties, but it doesn't seems to do so.75 Replies
But when doing it with other normal classes, it seems to work perfectly fine.
I'm wondering if this is just me or it also happens to others? If it's me, might be an issue with my
tsconfig.json
, so here it is just in case:
Only seems to work in JS?
Not sure why this happens but I doubt there is much we can do abouut it. We provide the typings files and they're perfectly valid files. This is on TS server not providing the hints.
Anyway I'll ping @vladdy and @kyra 🩵🩷🤍🩷🩵 in here see if they have any thoughts
Alright, thanks a lot.
I might end up making an issue on TypeScript repository if it's really something TS-related
Okay I found what causes it actually
but this is definitely a TS issue
if you remove the type arguments from the class then it does work
so in the typings file change
to
Naturally you cant actually do this because it will break a lot, but you can use that when creating your report to TS
Interesting, will for sure include it on the issue
screenshots that shows that
what I find interesting is that both of these do work
oh wait it's not the generic type, it's the extend AliasPiece
but why..
hm weird I cannot reproduce it in test classes
well something funky is happening anyway
Yepp
might be best to link them a tiny sapphire repro repo
with just a single command file and such
I thought maybe this would repro it but no
Maybe its something to do with declare
Does it working on JavaScript and not in TypeScript means something important?
not sure..
even this code which mimicks Sapphire's entire extension stack doesnt repro the issue
BaseClass = Piece
ExtendedClass = AliasPiece
FinalClass = Command
tried addng declares to the code above and still works
Wtf
also added namespaces, still cnr
well uh...
seems to be working pretty fine with typescript playground 💀
TS Playground - An online editor for exploring TypeScript and JavaS...
The Playground lets you write TypeScript or JavaScript online in a safe and sharable way.
real weird
Then maybe its a vscode issue
yupp, probabl
@Boomeravna @vladdy Removing this in the Piece class seems to fix it:
h u h
exactly 💀
why does the container break it
this is giving me headache
apparently if i change the type to like a string, seems to fix it too
what happens if the getter is moved from piece to command?
seems to work too
found another useful thing too
????
renaming the interface "Container" to another name fixs it
H U H
LOL
PARDON MY WHAT
is like Container an already defined object or something? 😭
ohhh
dom types maybe?
but i dont think it is
could be, let me try something
i removed the interface of Container
and
CTRL + CLICK
the "Container" in the container get accessor of the Piece class
redirected me to thisreverting everything and removing this Container interface seems to fix it
so module augmentation breaks it
oof.
it seems so 😭
that sounds like a ts issue then but idk how to report that
imma try reporting it even though will be my first time doing so, but first i'll see if i can find any existing report anywhere
Either way, thank you very much for doing so much investigation @Sandy Stone. It's extremely valueable.
it's everything alright 💓 i want to have the best experience using this framework, and if i can find anything to do in order to make it even more awesome, i'm willing to do it not just for me, but for anyone else
found this pretty useful log in tsserver
it's definitely vscode tsserver
related issues are either closed or missing information
https://github.com/microsoft/vscode/issues/115605
https://github.com/microsoft/vscode/issues/115435
https://github.com/microsoft/TypeScript/issues/37759
https://github.com/microsoft/TypeScript/issues/37358
will make the issue to see what they say
i will first put it on typescript repository and not in vscode
because
vscode repository issues are... the image is self explanatory
alright, made it, hopefully explained enough to get an useful reply 😭🙏
GitHub
Module augmentation seems to break entirely a class definition/body...
🔎 Search Terms "debug failure completionInfo", "module augmentation breaks autocomplete classes" 🕗 Version & Regression Information This is the behavior in every version I t...
@vladdy @Boomeravna btw if any of you could take a look at the "Additional information about the issue" section to see if i'm right about what i said about the sapphire package, as i got no idea how the framework works behind the scenes, will appreciate it 🙏
LGTM
pefecto
added to typescript 5.6.0 milestone 👏
Wouldn't be the first time I've had a debug failed while using ts and sapphire
Lets hope its an ez fix
hopefully 🙏
So this why it wasn't working (in my computer) all this time 🤯
in everyones it seems 😭
pull request created, fixes the issue i believe
awesome!!
delayed 😔
i think it's still coming to typescript 5.6.0 though, which would be in september 3rd
:dead:
Solution
FIX MERGED 🎉
should be available now in
typescript@next
nvm it's not. idk how this repository works, but atleast it's merged nowcould be available tomorrow though? idk
yeah it should be available tomorrow as
@next
releases seem to be published at midnight for each day, and this pull request was recently mergedsuper cool
I'd say that one can finally be marked as the answer lol