I'm Calin Baenen – AKA KattyTheEnby – a programmer born October 30th, 2006.
I love programming, it has been my passion since I was a kid, and will forever be my passion.
Also, I believe with String, you can have a null value, and with string, you can't (at least in any typed-language that doesn't support type-reassignment (i.e. Typescript(?)), though, I could be wrong, since I'm basing this off of my knowledge with C# and Java objects).
Since Typescript is a superset of JS (which does not have types), you can assign null to string as well. But if you want to opt out of this behaviour, in your tsconfig you can set, strictNullChecks to true. Now you won't be able to assign null to a string variable.
I'm Calin Baenen – AKA KattyTheEnby – a programmer born October 30th, 2006.
I love programming, it has been my passion since I was a kid, and will forever be my passion.
Yeah. Cool.
Though, I only wish there was a way to use TS in the browser natively, I know it has to be "converted" to JS, but like, why can't we just have it interpreted like JS, and have that as another option? It'd save a hassle.
I'm Calin Baenen – AKA KattyTheEnby – a programmer born October 30th, 2006.
I love programming, it has been my passion since I was a kid, and will forever be my passion.
Also, I believe with
String, you can have anullvalue, and withstring, you can't (at least in any typed-language that doesn't support type-reassignment (i.e. Typescript(?)), though, I could be wrong, since I'm basing this off of my knowledge with C# and Java objects).Since Typescript is a superset of JS (which does not have types), you can assign
nulltostringas well. But if you want to opt out of this behaviour, in yourtsconfigyou can set,strictNullCheckstotrue. Now you won't be able to assignnullto astringvariable.Yeah. Cool.
Though, I only wish there was a way to use TS in the browser natively, I know it has to be "converted" to JS, but like, why can't we just have it interpreted like JS, and have that as another option? It'd save a hassle.
I would love that as well.. :D
I mean, the script tag NEEDS another use, bc outside if js, it's useless.
If I knew how to make, or modify a browser, I wold make such a thing.
#NativeTSSupport