KlainMain monogram KlainMain
Get startedGitHub
StartOverviewInstallationGetting started
GuideLanguage guideStandard libraryCLI & flags
GuidesOverviewTUI · Layout & componentsTUI · Input & stateTUI · Live dashboardsDesktop · File explorerConcurrency · Load testerMobile · Sailfish OS
ReferenceCoverage matrix
LanguageArray methodsGlobal functionsJSDocJSONLanguage constructsModulesNumber, Math & BigIntObject, Map & SetRegExpString methodsType systemWeb APIsBinary data & typed arraysDeferred browser APIsEncoding & textEvents & cancellationfetch & HTTP clientPerformance timingTimersURL & URLSearchParamsWeb CryptoWebSocket, SSE & XHRNode.jsConcurrency & workersconsoleEventEmitterFile system (fs)HTTP serverMemory managementnode:ffinode:sqliteosOther Node core modulespathProcess & CLIStreams
Overviewklain:webviewklain:httpklain:sync
ExamplesOverview
Array BoundsArray From ArraylikeArray FunctionsArray MethodsArray Reference SemanticsArray To StringArraysArrays In ContainersArrays Of ObjectsHigher OrderIndex AppendLiteral TablesMutators EverywhereNested ArraysReference AliasingReturn Capture AliasingSortSpread RestUndefined Absence
Assert
Aggregate ErrorAsyncAsync GeneratorAsync IterableAsync Local StorageConcurrent TasksFor Await IterablesNew PromiseOne Event LoopPromise AllPromise ChainingPromise Combinator ShapePromise RejectionTop Level Await
Arguments ObjectAsiBasicsBitwiseConstContinueDataviewDestructuringExponentiationFloat FormattingFor OfFunction ObjectsHexLogical AssignmentLogical OperatorsNamespacesNull Deref TypeerrorNumber MethodsOptional CallOptional ParamsOptional Params FunctypeParse FunctionsSequence OperatorSwitchTernaryUndefined NumberVar ScopeVar HoistingVoid Operator
Bigint
Blob
BufferModule
Child ProcessFork IpcStreams
Class FactoryClass Statics Per EvalClass ValuesClassesError SubclassExtends ArrayExtends DateExtends MapExtends PromiseExtends RegexpForeign ArgumentLiteral Member NamesLocal Class ClosureSelf Ref Frozen FieldSymbol Keyed Fields
Array Of ClosuresClosuresDefault ParamsFall Off The EndNested Capture
ClusterCluster EventsWorker Messaging
ConsoleFormatInspect Long ArraysInspect Tostringtag
Control FlowTry Finally
Sailfish Cli
Create HashCryptoKey AgreementKey Object
Date
Class DecoratorsDecorator MetadataDecoratorsFactory DecoratorsMethod DecoratorsStandard Decorators
Echo
LookupResolve Promises
Any Arrays SymbolsAny MethodsAny Null UndefinedAny ParametersBoxed Array StringifyDynamic ObjectProxy ReflectWiden Fresh Object
Encoding Text
Enums
Event MapEventemitterMulti ArgOverride
Abort ControllerAbort OnabortAbort Signal StaticAbort Timeout DispatchEvent CustomeventEventtargetFetch AbortOnOnce
Eventsource
FetchFetch InitFetch Request HeadersFetch Request InitFetch Response HeadersFetch ThenHeadersLazy BodyWttr WeatherXhr
Ffi
Finalization Registry
FsFs Async PoolFs EisdirFs Link TypesRead Stream BackpressureStatfs Umask Fchmod
Fs Async
Fs Promises Pool
Fs Streams
Fs Watch
Bind RestCall ApplyForward ReferenceFunction ExpressionsNamedOptional Any ParamOwn Properties
Generator Array YieldGenerator ExpressionsGenerator Sent ValueGeneratorsIterator Helpers
Erased GenericsGeneric ArrowsGeneric PromiseGenericsMulti Type Params
GlobalsNamespace ValuesShadowed GlobalsStatic Eval
Parallel PrimesPipelineSelect
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
Client SessionConstants SettingsH2c ServerModule ServerStreams Server
Secure Server
Https Server
Default ExportDynamic ImportDynamic NeverDynamic ReportGreetImport Meta UrlImportsKlain Modules PackageMathNamed Builtin ImportNamespace ImportRe ExportRe Export CoreRe Export LibRequire CommonjsScopingScoping AScoping BSide EffectsSide Effects SetupType OnlyType Only Shapes
Line LayoutObject Print
Extends MergeInterfacesRecursive Types
PureTyped JavascriptWidths
JsonJson DynamicJson MethodsJson Null StringsJson ObjReplacer Reviver
Namespaces V2Object Type SignaturesOverload SignaturesParameter PropertiesSpread Args
Destructuring Assignment
Literal Expressions
Any KeysIteratorsMap
Math Methods
Memory AutoMemory Deep FreeMemory FreeMemory GcMemory OptimizeMemory Value Arrays
Nested Functions
Client ServerConnect ErrorEcho ServerIs Ip
Nullable Scalars
Evolving AnyNullish
Any FieldsArray Field AliasingComputed KeysGetters SettersGroup ByObject StaticObjectsOptional FieldsSymbol Keys
OsOs Info
PathPath Win32
Observer
Diagnostics ChannelEnv Argv UndefinedEventsGraceful ShutdownProcessProcess InfoSpawn SyncSpawn Sync Options
Stream
Querystring
LinesReadline
RegexpRegexp DialectsRegexp EcmascriptRegexp Replace CallbackRegexp Utf16
Set
Sqlite
Class ExtendsDefault String ChunksFetch BodyGzipHttp ChunkedHttp UploadNamed ExportsNode StreamPipelineQualified NewRead Done ValueReadableStream Web
Char CodeEscape SequencesReplace CallbackReplace Capture GroupsSearch CompareString ConcatString IndexingString MethodsString StaticStringsSubstring SliceTemplate LiteralsUnicode Case
Structured Clone
Tagged Templates
TestingUnit Tests
ModulePromisesTimersZero Delay Clamp
Tls ClientTls Server
Division By ZeroError CauseTry Catch
Keys
Tuples
Typedarrays
Ambient DeclareAny UnknownBare Class FieldsConditional TypesErased SyntaxFunc Type RestIndex SignatureIntersectionsMapped TypesMember UpdateNumber ModelStatic Field InitSymbolTypeof QueryUnion ValuesUnionsUtility Types
File Url FlavorUrlUrl ParseUrlpattern
Format InspectParse ArgsPromisify
Weak
Websocket BinaryWebsocket ClientWebsocket Server
BindingsEmbeddedInlineSpaSpa Server
Await WorkerBroadcastBrowser EchoCounter WorkerNews WorkerParallel SumPort PairPort WorkerShared CounterShout WorkerSum WorkerTop Level Await Worker
Brotli ZstdZlib
Examples/Modules

Dynamic Never

Imported by dynamic_import.ts only behind a branch that never runs: its top-level never runs there.

console.log('never: evaluated');
export const unused: number = 0;
View source on GitHubexamples/imports/dynamic_never.ts
← Dynamic ImportDynamic Report →