Specifying Types
I'm quite new to Typescript, but I'm slowly getting the hang of it.
Although, I was wondering if there's a way to set the type to an TextChannel? Check the image below for what I mean.
Solution:Jump to solution
Yes just import the class then write as TextChannel, or first write it as such and let vscode fix the import when it says it’s not there yet.
3 Replies
As you can see it's specifying the type (or whatever it's called) to any, although I was wondering if I can mark it as a TextChannel as that's what it is?
Solution
Yes just import the class then write as TextChannel, or first write it as such and let vscode fix the import when it says it’s not there yet.
@qvgk You can also do: