Telegram_2018-03-25T17

<< Click to Display Table of Contents >>

Navigation:  Telegram > 2018 > 03 > 25 >

Telegram_2018-03-25T17

Telegram link

 

2018-03-25T17:17:38

 

LOL

 


 

Telegram link

 

2018-03-25T17:17:45

 

Did you \use strict\, Chad?

 


 

Telegram link

 

2018-03-25T17:18:28

 

oh! Type safety... not undeclared variables :)

 


 

Telegram link

 

2018-03-25T17:18:59

 

You need to check for types in your function... unless it's not your function, and it's someone else's.

 


 

Telegram link

 

2018-03-25T17:19:30

 

don't rely on use strict if you have to support older browser. That's a recipe for disaster

 


 

Telegram link

 

2018-03-25T17:20:10

 

Thanks for your advice, Alexandre.

 


 

Telegram link

 

2018-03-25T17:23:54

 

There are no directives that can detect this...

 


 

Telegram link

 

2018-03-25T17:24:53

 

not typeof?

 


 

Telegram link

 

2018-03-25T17:24:54

 

type: link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof

 


 

Telegram link

 

2018-03-25T17:25:50

 

I use this lint tool online (which I think is the best I've tested so far): type: link http://jshint.com

 


 

Telegram link

 

2018-03-25T17:26:04

 

helped and saved my ass a few times ??

 


 

Telegram link

 

2018-03-25T17:26:46

 

however, if you follow all its advices, you will probably break your beloved JS code. You know, JS depends on some bugs to work correctly LOL

 


 

Telegram link

 

2018-03-25T17:42:29

 

I have a linter too, it cannot catch it all and linters are hacks for a shitty compiler in this case.

 


 

Telegram link

 

2018-03-25T17:43:15

 

The linter I have is set to very agressive settnigs, and Im actually using TS as well which also enforces things best it can. .but its still on top of JS.

 


 

Telegram link

 

2018-03-25T17:43:22

 

type of is almost useless

 


 

Telegram link

 

2018-03-25T17:43:42

 

it cant distinquish between different obejcts, and doesnt help with type sfatey.

 


 

Telegram link

 

2018-03-25T17:44:15

 

function foo(x: string)

 

x = new object();

 

foo(x) is valid in many cases where not even a linter can catch it

 


 

Telegram link

 

2018-03-25T17:44:31

 

TS can catch it in most cases.. but not all becuase of JS

 


 

Telegram link

 

2018-03-25T17:46:32

 

VB even in its shittiest days was 1000x more type safe than JS even wtih the harshest of linters.

 


 

Telegram link

 

2018-03-25T17:58:33

 

:D