Sciextor

Security is Everyone's Job

TypeScript

TypeScript was created by Microsoft in 2010, and its first version was released to the public in 2012

The main purpose of TypeScript is to make JavaScript development easier and more reliable, by adding static typing and other features that can help catch errors, improve tooling, and support modern syntax.

TypeScript code can be compiled to plain JavaScript, which can run on any browser or platform that supports JavaScript


What uses TS


Here is an example of TS


				interface Person {
                                    name: string;
                                    age: number;
                                }

                                function greet(person: Person) {
                                    return `Hello, ${person.name}. 
                                    You are ${person.age} years old.`;
                                }

                                let user: Person = {
                                    name: "Alice",
                                    age: 25,
                                };

                                console.log(greet(user));