meta_pixel
Tapesearch Logo
Log in
Syntax - Tasty Web Development Treats

Hasty Treat - TypeScripts Strict Explained

Syntax - Tasty Web Development Treats

Wes Bos

Tech News, News, Technology

4.9 • 1.2K Ratings

🗓️ 6 September 2021

⏱️ 18 minutes

🧾️ Download transcript

Summary

In this Hasty Treat, Scott and Wes talk about the Typescript strict flag — what it does and why you might use it. Sanity - Sponsor Sanity.io is a real-time headless CMS with a fully customizable Content Studio built in React. Get a Sanity powered site up and running in minutes at sanity.io/create. Get an awesome supercharged free developer plan on sanity.io/syntax. LogRocket - Sponsor LogRocket lets you replay what users do on your site, helping you reproduce bugs and fix issues faster. It’s an exception tracker, a session re-player and a performance monitor. Get 14 days free at logrocket.com/syntax. Show Notes 02:50 - What is it? Future versions of TypeScript may introduce additional stricter checking under this flag, so upgrades of TypeScript might result in new type errors in your program. When appropriate and possible, a corresponding flag will be added to disable that behavior. 03:26 - noImplicitAny The any type in TypeScript is exactly that - it can be anything. TypeScript will try to infer the type. When it can’t it will be any. Sometimes you need any, but if that is the case, you must explicitly type it as any. If something is implicitly any - it might be a mistake, or you forgot to type it. Risky! 06:01 - noImplicitThis You must type this - it can’t be implicitly inferred. 06:47 - strictFunctionTypes If you have a type that is a function and it doesn’t 100%. 07:44 - alwaysStrict Always turns on strict mode. You can’t do things like redeclare var variables. 09:25 - strictNullChecks Makes you check that the item is actually there before accessing a value or method from it. Imagine you filter or find on an array, or query selector a DOM element. There is a possibility that nothing is there. strictNullChecks makes you check that it’s there - like an if statement. Optional chaining is super handy here. 11:18 - strictBindCallApply 12:38 - strictPropertyInitialization 13:37 - useUnknownInCatchVariables Links https://www.typescriptlang.org/tsconfig#strict Tweet us your tasty treats! Scott’s Instagram LevelUpTutorials Instagram Wes’ Instagram Wes’ Twitter Wes’ Facebook Scott’s Twitter Make sure to include @SyntaxFM in your tweets

Transcript

Click on a timestamp to play from that location

0:00.0

Monday Monday Monday open wide dev fans get ready to stuff your face with Javascript CSS node module barbecue tips get work flows break dancing soft skills web development the hastiest the

0:13.5

Carrazius the tastiest web development treats coming in hot here is West

0:19.2

Barakuda boss and Scott L. Toro Lugo to Lenski

0:25.2

Oh

0:26.2

Welcome to syntax in this Monday hasty treat. We're gonna be talking about type script strict

0:32.7

Type you could say it's type strict maybe type strict. Oh, I like that type

0:38.5

In this episode is gonna be a lot of fun. My name is Scott Lenski. I'm a developer from Denver, Colorado, and with me as always is West boss

0:45.9

Hey, everybody. I'm a developer from Hamilton, Ontario. Nice. I love it very nice Hamilton Tigers

0:52.8

Home of the Hamilton Tigers Tiger cats. Yeah, so this episode is sponsored by two amazing companies

0:58.5

We're talking about Sanity and the log rocket West you want to talk about Sanity. I'll talk about log rocket

1:03.6

Sanity is a unified content platform that powers better better digital experiences. What does that mean? Well, they are a pretty slick service

1:13.1

That you can use to build a they say digital experience, but it's a CMS that is wicked

1:20.5

So you sign up for Sanity. It's a hosted service, but the Sanity studio is

1:26.6

Something that you can run locally and run on your computer, and it just talks to Sanity via API

1:32.0

And that means you've got full control over custom inputs and things like that

1:36.6

But you don't give up like it's really the best of both worlds

1:39.5

You get all the stuff like you can see who's editing or who edited something or have custom workflows where you you save something

1:47.3

But it has to be approved by somebody else and really just like super flexible content platform check it out

1:53.2

Sanity.io forward slash syntax double the free usage tier fuse at URL. Thank you Sanity for sponsoring this episode

2:00.4

It's all sponsored by log rocket log rocket.com is the perfect place to see all of your errors and exceptions happen

2:07.4

And I'm talking about actually seeing them with a scribble video replay that you get your network requests to get your console log

2:15.2

Get all that stuff and more in the ability to actually see what's happening in the user site when the user clicked on the thing and broke the thing and

...

Please login to see the full transcript.

Disclaimer: The podcast and artwork embedded on this page are from Wes Bos, and are the property of its owner and not affiliated with or endorsed by Tapesearch.

Generated transcripts are the property of Wes Bos and are distributed freely under the Fair Use doctrine. Transcripts generated by Tapesearch are not guaranteed to be accurate.

Copyright © Tapesearch 2026.