Reference

Examples

Every language feature has a runnable example under examples/ — no README snippets to go stale, just .ts files that compile and run, verified on every build. All 407 of them are here, grouped by area; pick one from the tree on the left.

Arrays 19

assert 1

Async / Promise 14

Basics 29

BigInt 1

Blob 1

Buffer 2

child_process 3

Classes 15

Closures 5

cluster 3

console 4

Control flow 2

Cross Compile 1

Web Crypto 4

Date 1

Decorators 6

dgram 1

dns 2

Dynamic 8

Encoding / Text 1

Enums 1

EventEmitter 4

Events 9

EventSource 1

fetch 10

Ffi 1

Finalization 1

File system 6

fs (async) 1

Fs Promises Pool 1

fs (streams) 1

Fs Watch 1

Function expressions 7

Generators 5

Generics 5

Globals 4

Concurrency (klain:sync) 3

HTTP server 33

HTTP/2 6

Https 1

Modules 22

util.inspect 2

Interfaces 3

JSDoc 3

JSON 6

Language 6

Literal expressions 1

Map 3

Math 1

Memory management 6

Nested functions 1

net 4

Nullable scalars 1

Nullish 2

Objects 9

os 2

path 2

Perf 1

Process / CLI 8

Process stdin 1

querystring 1

readline 2

RegExp 5

Set 1

Sqlite 1

Streams 13

Strings 13

Structured Clone 1

Tagged Templates 1

Testing 2

Timers 4

tls 2

Try Catch 3

Tty 1

Tuples 1

Typedarrays 1

Types 17

URL 4

util 3

Weak 1

WebSocket 3

Webview (Desktop) 5

Workers 12

zlib 2