{{ summaryTitle }}
{{ summaryValue }}

{{ summaryLine }}

CompilerTS {{ report.compiler_version }} Target{{ targetLabel }} Strictness{{ strictnessLabel }}
{{ summaryAnnouncement }}
TypeScript validation inputs
One browser-local .ts, .tsx, .mts, .cts, or text file; maximum 20 KB and 1,000 lines.
{{ sourceStatus }}
{{ sourceError }}
Choose TSX only when the source contains JSX syntax.
Choose the oldest supported runtime for this isolated source check.
Imports are reported as unsupported project context rather than fetched.
Strict is the recommended default for new TypeScript code.
Hidden is neutral and keeps the ledger compact.
Outcome

{{ reportSummary }} Source preserved, emit disabled, and no code executed.

Recommended next step

{{ recommendation }}

Compiler context

TypeScript {{ report.compiler_version }} checked one in-memory {{ sourceModeLabel }} file using {{ targetLabel }}, {{ moduleLabel }}, and {{ strictnessLabel }}.

{{ report.context_label }}. DOM, WebWorker, Node.js, framework, package, path-alias, tsconfig inheritance, and remote module declarations are not loaded.

{{ briefExportStatus }}
{{ chartExportStatus }}

The chart renderer is unavailable. The same category counts remain available in the brief and findings ledger.

TypeScript diagnostics ordered by source location and diagnostic code
LocationCodeCategoryFindingNext stepCopy
{{ diagnosticLocation(finding) }}{{ finding.code }}{{ finding.category }}{{ finding.message }}{{ finding.excerpt }}{{ finding.next_step }}
No compiler diagnostics in this bounded context.Run the same source in its real project to verify dependencies, tsconfig, runtime behavior, lint rules, and framework types.
{{ ledgerExportStatus }}

Showing the first {{ report.diagnostics.length }} findings. Fix them, then validate again.

A TypeScript snippet does not have one context-independent meaning. The selected ECMAScript target decides which language features and core library declarations are available. Module settings affect how imports and exports are interpreted. Strictness changes which uncertain values and declarations become errors. TSX adds JSX grammar that ordinary TypeScript source does not accept.

Compiler diagnostics are therefore evidence about source plus configuration. A BigInt literal can be valid with an ES2020 target and rejected with ES2018. A parameter without an explicit type can pass relaxed checking and fail under strict checking. Angle-bracket JSX needs TSX mode, while the same characters may describe generics or comparisons in a TypeScript file.

TypeScript validation contexts and their effects
Context choice What it changes Common mistake
Language targetAccepted syntax transformations and available ECMAScript core declarationsChecking modern code against a newer target than the deployed runtime
Module modeCompiler treatment of ES module or CommonJS syntaxAssuming a single-file check reproduces package and loader behavior
StrictnessA group of stronger type-safety checksCalling relaxed success equivalent to a strict project build
Source modeTypeScript or TSX grammar and the submitted file identityUsing TypeScript mode for JSX or assuming generic JSX names provide framework types

The compiler also needs declarations for the surrounding environment. Browser APIs come from DOM libraries, Node.js globals come from Node type packages, and frameworks and dependencies contribute their own types. Without those declarations, a single file cannot settle whether an import exists, a component prop is correct, or a runtime global is available.

That limitation is useful when it is explicit. An isolated check can expose syntax and type errors that depend only on the file and selected core library, while reporting imports as missing project context instead of fetching packages or guessing their types. It also leaves the source unchanged and does not emit or execute JavaScript.

The final authority for production code is the real project configuration: its tsconfig.json, package graph, declaration files, module resolution, framework settings, generated types, and build command. Use an isolated report to shorten the first review, then run the project compiler and tests before release.

How to Use This Tool:

Match the oldest runtime and source grammar you actually support before interpreting compiler diagnostics.

  1. Paste source into Source or load one local .ts, .tsx, .mts, .cts, or text file. The source must stay within 20 KB and 1,000 lines.
  2. Choose TypeScript for ordinary typed source or TSX with generic JSX names when the file contains JSX. Generic JSX declarations allow intrinsic tag names for syntax and basic type checking; they do not supply React or another framework's types.
  3. Set Language target to the oldest supported runtime: ES2018, ES2020, ES2022, or ES2025. Then choose ES modules or CommonJS to match the source's intended module form.
  4. Keep Strict for new code unless the destination project deliberately uses relaxed checking. Showing affected source lines changes only the ledger presentation.
  5. Fix compiler errors in source order and treat context findings separately. Imports, package types, path aliases, and project references must be checked in the real project rather than repaired as if they were local type errors.

Interpreting Results:

Errors come from the pinned TypeScript compiler under the selected target, module mode, strictness, source mode, and bundled core library. The diagnostic code and source position help connect a message with compiler documentation and the affected expression.

Context findings identify imports, exports from another module, dynamic imports, or require() calls that cannot be resolved in a one-file check. They are not proof that the dependency is missing. They mean the result cannot decide without the destination project's filesystem and configuration.

No diagnostics means no supported compiler or context finding was returned for this isolated setup. It does not prove that the code builds, runs, passes lint or tests, resolves dependencies, matches framework declarations, or behaves securely. Run the project type-check command with its own configuration next.

Technical Details:

The compiler program contains one submitted source file plus bundled ECMAScript core declaration files for the selected target. DOM, WebWorker, Node.js, framework, test-runner, and package declarations are absent. Module resolution is disabled, JavaScript input is not accepted, library declaration checking is skipped, and emission is turned off.

Mechanism Core

TypeScript single-file validation mechanism
Stage Mechanism Observable result
Bound sourceRequire non-blank text no longer than 20,000 characters or 1,000 lines.Input issue before compilation
Build contextSelect TypeScript or TSX identity, ECMAScript target, ES module or CommonJS mode, strict or relaxed checks, and matching core declarations.Versioned context label
Compile without emitCollect option, global, syntactic, and semantic diagnostics for the submitted file without writing JavaScript.Compiler diagnostic code, category, message, and source range
Mark unresolved contextRecognize static imports, re-exports, import-equals forms, dynamic imports, and require() calls without resolving them.Context finding at the module specifier
Order and boundDeduplicate findings, sort by line, character, code, and message, then keep the first 100.Stable ledger and truncation signal

Rule Core

The selected controls map to compiler rules rather than post-processing labels. Keeping the mapping explicit explains why the same source can produce a different valid report after one setting changes.

TypeScript compiler setting rules
Choice Applied rule Important boundary
ES2018, ES2020, ES2022, or ES2025Sets the compiler target and loads the corresponding bundled ECMAScript core declarations.No DOM, Node.js, framework, or package declarations are added.
ES modules or CommonJSSets the compiler module kind to ESNext or CommonJS.Package metadata and runtime loader rules are not simulated.
StrictEnables the compiler's grouped strict checks.The exact set belongs to the pinned compiler version and may differ from other releases.
RelaxedDisables the grouped strict option.Other compiler errors can still occur; relaxed does not mean unchecked.
TypeScriptParses the input as a .ts source file without JSX.JSX syntax is not accepted.
TSXParses the input as .tsx, preserves JSX, and supplies generic intrinsic JSX names.No framework-specific components, props, factories, or runtime are declared.

Compiler diagnostics for unresolved modules are replaced by a single explicit context finding for each module use. This avoids presenting a failed package lookup as if the browser had inspected the user's project. It also keeps imports inert; no package, alias, or remote module is fetched.

Result counts separate compiler errors, warnings, and context findings. Compiler messages are version-dependent, so comparisons between reviews should keep TypeScript 6.0.3, target, module mode, strictness, and source mode unchanged.

Limitations:

This is a bounded TypeScript 6.0.3 single-file check, not a project build. The result intentionally excludes configuration inheritance, dependency resolution, project references, generated declarations, framework types, filesystem modules, and runtime behavior.

  • The source is not formatted, rewritten, emitted, bundled, installed, imported, or executed.
  • Only the first 100 ordered diagnostics are retained; fix them and recheck if the result is truncated.
  • Pasted or loaded source stays in the current browser tab and is not placed in the shareable page state.

Worked Examples:

BigInt on an older target

With Language target set to ES2018, const value = 1n; reports TS2737 because BigInt literals require ES2020 or later. Raising the target clears that specific diagnostic only when the real runtime also supports the newer target.

Imported project type

A file that imports a package receives a context finding at the module specifier because packages are not resolved. Move the same file into its project and run the configured compiler to decide whether the package, declarations, paths, and module settings are valid.

References: