UNPKG

alinea

Version:

[![npm](https://img.shields.io/npm/v/alinea.svg)](https://npmjs.org/package/alinea) [![install size](https://packagephobia.com/badge?p=alinea)](https://packagephobia.com/result?p=alinea)

14 lines (13 loc) 571 B
import { Hint } from './Hint.js'; import { Type, TypeTarget } from './Type.js'; import { RecordShape } from './shape/RecordShape.js'; export interface Schema<Definitions = {}> extends Record<string, Type> { } export declare namespace Schema { type Targets = Map<TypeTarget, string>; function shapes(schema: Schema): Record<string, RecordShape>; function hint(schema: Schema): Hint.Union; function targets(schema: Schema): Targets; function typeNames(schema: Schema): Map<Type, string>; } export declare function schema<T extends Schema>(types: T): T;