@wrnexus/typecheck
WRN-aware TypeScript diagnostics and virtual documents.
Install the package
After WorkRoot approves private registry access, install the release-aligned package:
bun add @wrnexus/typecheck@0.8.7Request preview access. Never put registry tokens in source control.
Static type checking for .wrn declarations, props, state, outputs, functions, stores, and generated virtual TypeScript files.
The package is compiler tooling rather than a browser UI package, so its public kit consists of programmatic typecheck helpers and diagnostics.
Complete TypeScript API
Generated from the exact installed package declarations.
import { PageAst } from '@wrnexus/syntax';
export { componentContract, storeContract } from './contracts.js';
export { findAppRoot, loadApplicationTypes } from './project.js';
interface WrnTypeDiagnostic {
code: string;
category: "error" | "warning" | "info";
message: string;
file: string;
line: number;
column: number;
length: number;
expected?: string;
received?: string;
hint?: string;
related?: {
file: string;
line: number;
column: number;
message: string;
};
}
interface TypecheckOptions {
filePath?: string;
appRoot?: string;
strict?: boolean;
noImplicitAny?: boolean;
strictNullChecks?: boolean;
checkRuntimeBoundaries?: boolean;
}
interface SourceMapping {
virtualStartLine: number;
virtualEndLine: number;
sourceStartLine: number;
sourceStartColumn: number;
}
interface VirtualTypeScriptModule {
ast: PageAst;
fileName: string;
code: string;
mappings: SourceMapping[];
}
declare function virtualTypeScriptModule(source: string, filePath?: string, appRoot?: string): VirtualTypeScriptModule;
declare function checkWrnSource(source: string, options?: TypecheckOptions): WrnTypeDiagnostic[];
declare function checkWrnFile(filePath: string, options?: Omit<TypecheckOptions, "filePath">): WrnTypeDiagnostic[];
export { type TypecheckOptions, type VirtualTypeScriptModule, type WrnTypeDiagnostic, checkWrnFile, checkWrnSource, virtualTypeScriptModule };
Examples
Copy-ready examples from the installed package documentation.
Install @wrnexus/typecheck
bun add @wrnexus/typecheckImport @wrnexus/typecheck
import * as typecheck from "@wrnexus/typecheck";