this post was submitted on 15 Aug 2023
13 points (93.3% liked)
No Stupid Questions (Developer Edition)
934 readers
1 users here now
This is a place where you can ask any programming / topic related to the instance questions you want!
For a more general version of this concept check out [email protected]
Icon base by Lorc under CC BY 3.0 with modifications to add a gradient
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Typescript is 3 things:
Generally, people use all three at once (
.ts
files), but you don't have to. Types aren't runtime code and can be mixed into the same file you are working on, even inline. Or you can use a separated.ts
file. Or you can use JSDocs.You can also ask the Typescript checker (bundled with the compiler) to perform type checking on your
.js
or.ts
with a slew of custom options. Commonly, when working with.ts
, if the type checker fails against the ruleset, it won't continue on to transcompiling to.js
.