KKitForma.

Language

EnglishEnglishTürkçeTurkishDeutschGermanTool unavailable · open catalogEspañolSpanishTool unavailable · open catalogFrançaisFrenchTool unavailable · open catalogPortuguêsPortugueseTool unavailable · open catalogItalianoItalianTool unavailable · open catalogNederlandsDutchTool unavailable · open catalogPolskiPolishTool unavailable · open catalogРусскийRussianTool unavailable · open catalogУкраїнськаUkrainianTool unavailable · open catalogSvenskaSwedishTool unavailable · open catalogNorskNorwegianTool unavailable · open catalogDanskDanishTool unavailable · open catalogSuomiFinnishTool unavailable · open catalogČeštinaCzechTool unavailable · open catalogRomânăRomanianTool unavailable · open catalogΕλληνικάGreekTool unavailable · open catalogالعربيةArabicTool unavailable · open catalogעבריתHebrewTool unavailable · open catalogفارسیPersianTool unavailable · open catalogاردوUrduTool unavailable · open catalogहिन्दीHindiTool unavailable · open catalogবাংলাBengaliTool unavailable · open catalogதமிழ்TamilTool unavailable · open catalogతెలుగుTeluguTool unavailable · open catalogमराठीMarathiTool unavailable · open catalogગુજરાતીGujaratiTool unavailable · open catalog简体中文Chinese SimplifiedTool unavailable · open catalog繁體中文Chinese TraditionalTool unavailable · open catalog日本語JapaneseTool unavailable · open catalog한국어KoreanTool unavailable · open catalogTiếng ViệtVietnameseTool unavailable · open catalogไทยThaiTool unavailable · open catalogBahasa IndonesiaIndonesianTool unavailable · open catalogBahasa MelayuMalayTool unavailable · open catalogFilipinoFilipinoTool unavailable · open catalogKiswahiliSwahiliTool unavailable · open catalogAfrikaansAfrikaansTool unavailable · open catalogMagyarHungarianTool unavailable · open catalogБългарскиBulgarianTool unavailable · open catalogHrvatskiCroatianTool unavailable · open catalogSrpskiSerbianTool unavailable · open catalogSlovenčinaSlovakTool unavailable · open catalogSlovenščinaSlovenianTool unavailable · open catalogLietuviųLithuanianTool unavailable · open catalogLatviešuLatvianTool unavailable · open catalogEestiEstonianTool unavailable · open catalogCatalàCatalanTool unavailable · open catalogEuskaraBasqueTool unavailable · open catalog
← All topics and search

JavaScript & TypeScript

Types, asynchronous code, modules and JavaScript runtime edge cases.

100 troubleshooting guides · Page 4 / 5

  1. Why does destructuring a discriminated union sometimes lose payload narrowing?

    Modern TypeScript can track certain const-destructured discriminants, but reassignment or separating correlated values can break that relationship.

  2. Why is an array not accepted where a function requires a two-item tuple?

    An array type does not guarantee length or positional types.

  3. Why can JavaScript still mutate a TypeScript Readonly object?

    Readonly is a compile-time restriction and is shallow.

  4. Why does Partial not make nested update fields optional?

    Partial transforms only the top-level properties.

  5. How do I get the resolved return type of an async loader?

    Use Awaited<ReturnType<typeof load>> on TypeScript versions supporting Awaited.

  6. Why does a default argument widen the allowed values of a generic selector?

    Inference may use both the choices and default arguments.

  7. Why does a function overload reject a union argument accepted by its implementation?

    Callers see overload signatures, not the implementation signature.

  8. Why does a conditional type split a union into separate results?

    A conditional over a naked type parameter distributes across union members.

  9. Why does keyof on an enum not produce the enum member names?

    For enum member names use keyof typeof Status: typeof obtains the enum object type, then keyof reads its keys.

  10. Why does Object.values of a numeric enum contain both names and numbers?

    Numeric enums emit reverse mappings.

  11. How do I type event names derived from a fixed property-name union?

    Use a template literal type when Field is a bounded string union: Keep runtime event registration synchronized with that model.

  12. Why does adding a property to Window in one file not affect other modules?

    A module-local interface does not automatically augment the global Window.

  13. Why does TypeScript say document or fetch does not exist in a browser project?

    Check the effective lib configuration and installed type packages.

  14. Why do test globals disappear after setting compilerOptions.types?

    An explicit types list limits which ambient packages are included.

  15. Does skipLibCheck fix conflicting versions of a dependency’s types?

    It skips declaration-file checking rather than reconciling incompatible definitions.

  16. Why does TypeScript resolve an import that Node cannot load?

    Module resolution must model the actual runtime or bundler.

  17. Why does a relative TypeScript import need a .js extension in Node ESM?

    The import specifier describes the runtime file that Node will load after compilation.

  18. Why must I use import type after enabling verbatimModuleSyntax?

    The compiler preserves imports according to explicit syntax.

  19. Why does code pass tsc but fail a single-file transpiler?

    Some TypeScript constructs need cross-file knowledge.

  20. Why does importing JSON compile but fail in the deployed runtime?

    resolveJsonModule supplies TypeScript resolution and types, not a universal runtime loader.

  21. Why does a default import from a CommonJS package fail despite type-checking?

    Inspect the package’s actual exports and the emitted interoperability helpers.

  22. Why does an import work on Windows but fail in Linux CI?

    Check filename casing against every import.

  23. Why does rootDir report a file outside the source tree despite exclude?

    Imported files become part of the program even when exclude filters discovery.

  24. Why does a TypeScript path alias remain unresolved in compiled JavaScript?

    paths helps TypeScript resolve names; it does not rewrite emitted specifiers.

Ask your own question · Sign in to post questions and answers.