Learn How to Program Through Deno and TypeScript by Vellapillil-Hari Indukumar

Learn How to Program Through Deno and TypeScript by Vellapillil-Hari Indukumar

Author:Vellapillil-Hari, Indukumar [Vellapillil-Hari, Indukumar]
Language: eng
Format: epub
Published: 2021-08-10T00:00:00+00:00


With the test, we found our typo!

However, it did take some effort to write the test. With static typing, some of the efforts required to write test can be reduced.

The way to achieve this is to "annotate" your program with "types" so that the compiler of your program can perform its own tests.

Note that JavaScript itself does not support any type annotations. However, TypeScript supports such type annotations as an addition to plain JavaScript so that its static compiler can verify the correctness of the programs you write.

Now, take the same file as before and just rename the extension from .js to .ts .

const recipe = {

name : "tea" ,

timeToCookInMin : 2

}



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.