Did you know that there's a tunnel under Ocean Blvd

Did you know that there's a tunnel under Ocean Blvd

This is easily one of the most underrated songs in the world and also one of Lana del Rey's albums which is easy to underrate. 

But the song and the album both of which share their name with this blog post are phenomenal and the album has been slowly getting to me as I realise that absolutely every single last song on it is perfection.


The title song is especially beautiful and perfect and I have been listening to it all day.

I started to think of it because of the line 'don't forget' probably heard at the train station and then I started singing the song 'don't forget me' and then that was it. It has taken nearly a year for me to appreciate this beautiful song.

How to use TypeScript

  • Type TypeScript files in files with the extension .ts
  • We run our code through the TypeScript transpiler 
    • The transpiler will check the code adheres to TypeScript's standards
    • It will display errors when it does not.
  • If the TypeScript code can be converted into working JavaScript, the transpiler will output a JavaScript version of the file (.js).

On TypeScript

Codecademy says, of JavaScript:

"

Stricter programming languages will inform the developer when they change one area of code in a way that will break other areas. JavaScript will not, which often leads to unexpected behaviour at runtime

"

The real joy of TypeScript, according to Codecademy, is that it:

"HELPS US UNDERSTAND MORE ABOUT OUR CODE AND, PARTICULARLY, DISCOVER BUGS".

The TypeScript Transcompiler

TO GET YOUR TYPESCRIPT CODE TO TRANSPILE INTO JAVASCRIPT YOU JUST NEED TO RUN A SIMPLE COMMAND IN THE TERMINAL: 

tsc

THERE ARE ALSO WAYS TO GET THIS TO GO AUTOMATICALLY 

I WILL WRITE IT OUT WHEN I GET ONTO IT. WHEN I FIND IT AGAIN. THANK YOU.

Type Shapes

"Because TypeScript knows what types our objects are, it also knows what shapes our objects adhere to. 

An object's shape describes, among other things, what properties and methods it does or doesn't contain".

Declaring Types

It is always better to declare a type wherever possible even if the type is any.

TypeScript Functions

I started learning about these some days. I learned some really cool things. Here are the biggest things that I learned: 

Parameter Type Annotations

I learned that when you assign a parameter to a function you can give it a type. 

Optional Parameters

You can also put a question mark after it, to make it optional and then assign a different default parameter option inside of the function instead.




I can't wait to do some more TypeScript tomorrow.

Comments

Popular posts from this blog

Hello World

Yosemite

Where To Hide A Star