Слайд 2What should I know about GIT?
Source control
Branching
Merge
Rebase
Cherry pick
Stash
Tag
Etc.
![What should I know about GIT? Source control Branching Merge Rebase Cherry pick Stash Tag Etc.](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/1028128/slide-1.jpg)
Слайд 4Why I should use Typescript?
Less bugs
Development performance
Features: type checking, autocompletion, source documentation
![Why I should use Typescript? Less bugs Development performance Features: type checking,](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/1028128/slide-3.jpg)
and etc.
Responsive support from the Typescript team
Starts and ends with JavaScript
Beautiful and elegant
Etc.
Слайд 5Getting started
https://nodejs.org/en/
npm install -g typescript (or install locally in dev dependencies)
tsc helloworld.ts
![Getting started https://nodejs.org/en/ npm install -g typescript (or install locally in dev dependencies) tsc helloworld.ts](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/1028128/slide-4.jpg)
Слайд 6How to compile
tsc helloworld.ts
tsconfig.json
![How to compile tsc helloworld.ts tsconfig.json](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/1028128/slide-5.jpg)
Слайд 7Settings
target
removeComments
outDir
sourceMap
outFile
files
Etc.
![Settings target removeComments outDir sourceMap outFile files Etc.](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/1028128/slide-6.jpg)
Слайд 8Variables
Use ES6 let and const to declare variables in Typescript.
let user: User
![Variables Use ES6 let and const to declare variables in Typescript. let](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/1028128/slide-7.jpg)
= new User();
const cardNumber: string = “**** **** **** 1111”;
Слайд 9Types
boolean
number
String
Object
Array
Tuple
enum
null
undefined
void
never
any
![Types boolean number String Object Array Tuple enum null undefined void never any](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/1028128/slide-8.jpg)
Слайд 10Type declaration
declare type primitive = number | string | boolean| null |
![Type declaration declare type primitive = number | string | boolean| null | undefined;](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/1028128/slide-9.jpg)
undefined;
Слайд 12What should I know about classes in TS?
fields
methods
constructor
static fields and methods
private/public/protected
get/set
readonly
![What should I know about classes in TS? fields methods constructor static](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/1028128/slide-11.jpg)
Слайд 13Inheritance and abstract classes
basic inheritance mechanism in general the same as in
![Inheritance and abstract classes basic inheritance mechanism in general the same as](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/1028128/slide-12.jpg)
ES6
abstract class can’t be instantiated
but more concrete implementation can be
example: abstract Figure, concrete Square and Circle.
Слайд 14What should I know about interfaces in TS?
syntax
optional and readonly properties
implementation
Interface inheritance
Function
![What should I know about interfaces in TS? syntax optional and readonly](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/1028128/slide-13.jpg)
and array interfaces
Слайд 15Generics
Use generics when something should work with any data types.
You can use
![Generics Use generics when something should work with any data types. You](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/1028128/slide-14.jpg)
them with functions, classes, interfaces.
Example: promisify, Map class.
Слайд 16Namespaces
Namespaces contains a group of classes, functions, interfaces, variables, other namespaces, etc.
Use
![Namespaces Namespaces contains a group of classes, functions, interfaces, variables, other namespaces,](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/1028128/slide-15.jpg)
namespace to declare namespaces.
Use exports for using entities in other namespaces.
Слайд 17Modules
TS support the following modules:
AMD (Asynchronys Module Defenition)
CommonJS
UMD (Universal Module Defenition)
System
ES 2015
Use
![Modules TS support the following modules: AMD (Asynchronys Module Defenition) CommonJS UMD](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/1028128/slide-16.jpg)
export/import features.
Example: User and UserService
Слайд 18Decorators
Allow to add metadata to classes or their members for changing their
![Decorators Allow to add metadata to classes or their members for changing](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/1028128/slide-17.jpg)
behavior without changing their code.
Decorator – function, which can apply on class, field, methods, getter, setter, parameters, etc.
Set experimentalDecorators: true for using decorators.