declaration for DetailedDescriptionCommand not working
so i declared DetailedDescriptionCommand in my index.d.ts and it's not working
41 Replies
everything else that I declared is working btw
i tried restarting vsc etc but still nothing
i did exactly as this guy
https://discord.com/channels/737141877803057244/1104400245774884884
and not working !!!!!!!
1. what is the location of your
index.d.ts
2. What is your tsconfig.json
3. what is the rest of your file/folder structurepastes | mNCHhnflXJ
A paste containing 111 lines of typescript.
tsconfig ^^
if I put index.d.ts in src then the rest of what I declare doesn't work for some reason
this is how everything works except DetailedDescriptionCommand
can you change your
tsconfig
to this and add @sapphire/ts-config
to your dev dependencies?
then move index.d.ts
to src
um did u change anything ...
is it still esnext
Solution
also rename it from
index.d.ts
to type-augments.ts
so drop the
.d
part
actually try just that first
yes I nuked your whole config and added the extendsum i can't rn but will send you results
in few hours
thanks
r u sure?
can i put it anywhere in src
like src/structures/types
yes
which font is that
node16, but esnext and node16 are the same for now. esnext is an identifier for potentially breaking. It's lke beta. https://github.com/sapphiredev/utilities/blob/main/packages/ts-config/src/tsconfig.json
GitHub
utilities/packages/ts-config/src/tsconfig.json at main · sapphirede...
Common JavaScript utilities for Sapphire Projects. Contribute to sapphiredev/utilities development by creating an account on GitHub.
Here are some of the fonts we believe are the best when coding, in no specific order:
- https://github.com/tonsky/FiraCode
- https://github.com/JetBrains/JetBrainsMono
- https://github.com/microsoft/cascadia-code
- https://github.com/adobe-fonts/source-code-pro
- https://github.com/source-foundry/Hack
Have a font you think would be a good addition to this list? Submit a Pull Request to Spinel's tags and we'll review it!
fira code ^
which font weight xd
idk normal
font size 14 tho
which theme xddd
https://marketplace.visualstudio.com/items?itemName=GitHub.github-vscode-theme -> GitHub Dark Default
GitHub Theme - Visual Studio Marketplace
Extension for Visual Studio Code - GitHub theme for VS Code
xD
even here
5.5.4 ts version btw
Downgrade to ~5.4.5.
GitHub
[node] Add generics to static members of
EventEmitter
by ckohen ·...While I originally set out to just add generics to static members of EventEmitter, I discovered a few quirks and bugs in the existing generic code that made it very hard to do well. In order to mak...
thats the most stable one?
also i need to put override on every method, how to disable that
@Boomeravna still 5.4.5 i get node_modules errors
Did you put ^5.4.5 or ~5.4.5
~5.4.5 like you said
And did you run pnpm install afterwards
i deleted node_moduels & lock
everything from scratch
¯\_(ツ)_/¯ idk then bro. Issue on your system. Can't tell much more without a full repo dump.
thats only when i use your tsconfig
xd
Well yeah because you have skipLibCheck enabled but that's a bad option that you should only enable if all else fails. You should make sure your environment works properly instead. You should also learn what each config key does and be able to analyze these kinds of things yourself in due time
@Boomeravna can i put that cooldowns don't affect people with some permission
like administrator
not with the built in one.
how to extend?
https://sapphirejs.dev/docs/Guide/preconditions/creating-your-own-preconditions
https://github.com/sapphiredev/framework/blob/main/src/preconditions/Cooldown.ts
Sapphire Framework
Creating your own preconditions | Sapphire
Just as we did in Creating Commands, we will start by creating a preconditions subdirectory in
GitHub
framework/src/preconditions/Cooldown.ts at main · sapphiredev/frame...
Discord bot framework built on top of discord.js for advanced and amazing bots. - sapphiredev/framework