Docs/guidesv1.0.0-rc.1

Type utilities

The root entry exports compile-time utilities such as DeepPartial, DeepReadonly, PickByType, Prettify and UnionToIntersection. There is no public @tagna/udiot/types subpath.

import assert from 'node:assert/strict';
import type { DeepPartial, DeepReadonly } from '@tagna/udiot';

interface Settings { theme: { mode: string; contrast: number } }
const patch: DeepPartial<Settings> = { theme: { mode: 'dark' } };
const defaults: DeepReadonly<Settings> = {
  theme: { mode: 'light', contrast: 1 },
};
assert.equal(patch.theme?.mode, 'dark');
assert.equal(defaults.theme.mode, 'light');

Type utilities disappear from emitted JavaScript. Readonly types do not freeze runtime values; partial types do not validate input or apply a patch.

Legacy reflection/schema/module declarations also appear as root type-only exports. Do not call or construct TypeRegistry, TypeValidator, SchemaValidator, ValidationPipeline, ModuleRegistry or ModuleLoader from those declarations. getTypeRegistry, DTO decorators and TypeAwareGenerator are not public root values.

Use the public API reference to distinguish values from types, and validation guide for supported runtime checks.

From the canonical UDIOT public documentation.Try it in the playground ↗