XTend Documentation
Enable dark mode

XTend Developer Center

Build with XTend today

Type Exports

The package export surface for the ESM Registry, loader, API, RMT, Fabric and components.

What it covers

package.json maps every public subpath to runtime and, where available, a types condition. Consumers import those subpaths; direct access to internal source or test paths is not stable.

Public building blocks

  • . and ./registry expose the browser Registry through xtend.d.ts and the DOM-neutral Node contract through xtend.ssr.d.ts.
  • ./loader and ./api cover explicit Classic browser bootstrap and UI API.
  • ./rmt, ./rmt/browser, and RMT language subpaths cover runtime and tooling.
  • Fabric, Maraca, builder, and component subpaths point to co-located .d.ts files.

RMT TypeScript Surface

The root entry resolves named aliases from xtend.d.ts. Browser-aware resolvers use xtend.js; Node and SSR use xtend.ssr.mjs together with xtend.ssr.d.ts.

import { schedule, render, createApp, createStore } from '@ccslabs/xtend';
import type { XTendScheduleOptions, XTendRegistryConfiguration } from '@ccslabs/xtend';

XTend publishes the RMT runtime and RMT tooling with stable types conditions. Hosts can use the declarative RMT layer without importing internal sources or build artifacts.

import { createRmtRuntime } from '@ccslabs/xtend/rmt';
import { createRmtBrowserRuntime } from '@ccslabs/xtend/rmt/browser';
import { compileRmtVNextSource } from '@ccslabs/xtend/rmt-language/vnext-compiler';

The main declaration files are ./xtendrmt/rmt-core.d.ts for kernel and browser runtime APIs, plus ./tools/rmt-language/rmt-tooling-public-types.d.ts for editor, linter and language-server integrations. This surface includes RmtToolingDiagnostic, RmtTextEdit, RmtWorkspaceEdit, RmtLanguageServiceReport and RmtJsonRpcMessage.

Gate Contract

plan: xtend.type-exports.plan.v1
drift report: xtend.type-exports.drift-report.v1
local gate: node scripts/run_xtend_tests.js type-exports --json
release gate: npm run test:type-exports:release
registry types: ./xtend.d.ts, ./xtend.ssr.d.ts
loader types: ./xtend-loader.d.ts via ./loader
api types: ./api.d.ts
decision: types-not-required

Maraca is classified through the package exports ./maraca and ./maraca/runtime, backed by ./xtend-maraca/index.d.ts and ./xtend-maraca/runtime.d.ts.

Maintained declaration waves

  • WP-TypeExports-03: core API declarations in ./api.d.ts; see ./xtend-api-types.md.
  • WP-TypeExports-05: shared policy declarations in ./fabric/xtend-policy-public-types.d.ts; see ./xtend-policy-types.md.
  • WP-TypeExports-06: builder declarations share ./xtend-builder/builder-public-types.d.ts; see ./xtend-builder-types.md.
  • WP-TypeExports-07: catalog declarations share ./catalog/catalog-public-types.d.ts; see ./xtend-catalog-types.md.
  • WP-TypeExports-08: vendor declarations include ./design-tokens/xtend-design-tokens.d.ts, ./design-tokens/xtheme-token-alias-layer.d.ts, and ./components/prism.d.ts; see ./xtend-vendor-types.md.

Import entries from package.json#exports only and let TypeScript resolve the same package version. Verify changes with node scripts/run_xtend_tests.js type-exports --json; add missing types or classify a path explicitly as runtime-only.

Next steps

(c) 2026 - CCS Networks | Powered by XRouter PHP Extension