Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

207
Views
is typescript truly strict?

I am new to typescript so this may be a dumb question or a odd question, which I don't doubt that it is, but please look at this example of what I mean:

typescript

var num:number = 5
console.log(num)

compiled to js:

"use strict";
var num = 5;
console.log(num);

in the compiled code there is not anything really restricting num from being anything but a number. So, is typescript really strict? Or is it just creating the allusion of being strict? Or perhaps is there a option in the tsconfig.json that is suppose to make the code strict that I missed?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

TypeScript tries to guarantee types at compile time, at runtime everything is dynamic. So if you communicate with an API and type it using TypeScript but the API delivers something else, then the "illusion", as you called it, will break.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!