import { MetadataVersion } from './enum.js'; import { DataType, TypeMap } from './type.js'; export declare class Schema { readonly fields: Field[]; readonly metadata: Map; readonly dictionaries: Map; readonly metadataVersion: MetadataVersion; constructor(fields?: Field[], metadata?: Map | null, dictionaries?: Map | null, metadataVersion?: MetadataVersion); get [Symbol.toStringTag](): string; get names(): (keyof T)[]; toString(): string; /** * Construct a new Schema containing only specified fields. * * @param fieldNames Names of fields to keep. * @returns A new Schema of fields matching the specified names. */ select(fieldNames: K[]): Schema<{ [P in K]: T[P]; }>; /** * Construct a new Schema containing only fields at the specified indices. * * @param fieldIndices Indices of fields to keep. * @returns A new Schema of fields at the specified indices. */ selectAt(fieldIndices: number[]): Schema; assign(schema: Schema): Schema; assign(...fields: (Field | Field[])[]): Schema; } export declare class Field { static new(props: { name: string | number; type: T; nullable?: boolean; metadata?: Map | null; }): Field; static new(name: string | number | Field, type: T, nullable?: boolean, metadata?: Map | null): Field; readonly type: T; readonly name: string; readonly nullable: boolean; readonly metadata: Map; constructor(name: string, type: T, nullable?: boolean, metadata?: Map | null); get typeId(): import("./enum.js").Type; get [Symbol.toStringTag](): string; toString(): string; clone(props: { name?: string | number; type?: R; nullable?: boolean; metadata?: Map | null; }): Field; clone(name?: string | number | Field, type?: R, nullable?: boolean, metadata?: Map | null): Field; }