https://github.com/microsoft/TypeScript-New-Handbook/blob/master/intros/TypeScript for the Haskell or ML Programmer.md

6154722

TypeScript for Functional Programmers

TypeScript began its life as an attempt to bring traditional object-oriented types to JavaScript so that the programmers at Microsoft could bring traditional object-oriented programs to the web. As it has developed, TypeScript's type system has evolved to model code written by native JavaScripters. The resulting system is powerful, interesting and messy.

This introduction is designed for working Haskell or ML programmers who want to learn TypeScript. It describes how the type system of TypeScript differs from Haskell's type system. It also describes unique features of TypeScript's type system that arise from its modelling of JavaScript code.

This introduction does not cover object-oriented programming. In practise, object-oriented programs in TypeScript are similar to those in other popular languages with OO features.

Prerequisites

In this introduction, I assume you know the following:

If you need to learn the good parts of JavaScript, read JavaScript: The Good Parts. You may be able to skip the book if you know how to write programs in a call-by-value lexically scoped language with lots of mutability and not much else. R4RS Scheme is a good example.

The C++ Programming Language is a good place to learn about C-style type syntax. Unlike C++, TypeScript uses postfix types, like so: x: string instead of string x.

Concepts not in Haskell

Built-in types

JavaScript defines 7 built-in types:

제목 없는 데이터베이스

See the MDN page for more detail.

TypeScript has corresponding primitive types for the built-in types: