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
Arguments ObjectAsiBasicsBitwiseConstContinueDataviewDestructuringExponentiationFloat FormattingFor OfFunction ObjectsHexLogical AssignmentLogical OperatorsNamespacesNull Deref TypeerrorNumber MethodsOptional CallOptional ParamsOptional Params FunctypeParse FunctionsSequence OperatorSwitchTernaryUndefined NumberVar ScopeVar HoistingVoid Operator
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
Async Handler Inproc ClientAsync Handler ProxyChained ListenClient Error EventClient ServerCluster Plus Extra ServerCreate Server HandleCreate Server OptionsCreate Server TimeoutsHttp Binary BodyHttp CloseHttp ClusterHttp ServerHttp Union BodyHttps ClientKeepalive And DateListen OptionsMulti ServerMulti Server H2Multi Server HttpsMulti Server UpgradeMulti Server Ws SecondaryNode CreateserverReq Pipe ResReq ReadableRes Backpressure DrainRes StreamRes Stream BackpressureRes Write BinaryRes Write Pipe InterleaveServer Close EventServer Connection EventServer Error Event