#Don't know what this is called.
20 messages · Page 1 of 1 (latest)
that's what ts is for
or you could also use jsdoc
Got any links for me to read or..?
well, both of those are googlable, but sure
I want to make sure I'm looking at the right information, sorry.
Ah, I know this was possible, for example: "async execute(interaction)". Is that no longer available or..?
vscode (for example) has a typescript server built-in, and ts itself can also process jsdoc within js files
idk about other ides, but they likely have similar setups
both ts and jsdoc build off of js
ts is a language that's a superset of js, and jsdoc is just a specific syntax of comments
Ah, okay, thank you. I'll do more research on this.
Hey (sorry for the ping if you dislike it), but just wanted to let you know I found a solution. There's a setting called "javascript validation" in VScode that I disabled and I was able to use the type anotations in a javascript file. (never mind lol)
node can't read that
Yeah, did more research and figured that out.
Would hate to switch to ts
I know this WAS possible.
well, no, it's just either use ts or jsdoc to provide types
"type annotations in js" sounds to me like you're already just writing ts
if you're getting types from this, you were getting the types from elsewhere, still via ts or jsdoc
i believe you could use d.ts files to avoid a compilation workflow, but that's just more maintenance to keep them in sync than writing ts directly for most cases