import { AbstractInstanceType, Schema } from '@rest-hooks/endpoint'; type Filter = T extends U ? T : never; /** Immutable record that keeps track of which members are defined vs defaults. */ export default abstract class SimpleRecord { toString(): string; static toJSON(): { name: string; schema: { [k: string]: Schema; }; }; /** Defines nested entities */ static schema: { [k: string]: Schema; }; /** Factory method to convert from Plain JS Objects. * * @param [props] Plain Object of properties to assign. * @param [parent] When normalizing, the object which included the record * @param [key] When normalizing, the key where this record was found */ static fromJS(this: T, props?: Partial>, parent?: any, key?: string): AbstractInstanceType; /** Creates new instance copying over defined values of arguments */ static merge(this: T, existing: AbstractInstanceType, incoming: AbstractInstanceType): AbstractInstanceType; /** Whether key is non-default */ static hasDefined(this: T, instance: AbstractInstanceType, key: Filter, string>): boolean; /** Returns simple object with all the non-default members */ static toObjectDefined(this: T, instance: AbstractInstanceType): Partial>; /** Returns array of all keys that have values defined in instance */ static keysDefined(this: T, instance: AbstractInstanceType): Filter, string>[]; static normalize(this: T, ...args: [ /*input*/ any, /*parent*/ any, /*key*/ any, /*visit*/ (...args: any) => any, /*addEntity*/ (...args: any) => any, /*visitedEntities*/ Record, /*storeEntities*/ Record, /*args*/ any[] ]): NormalizedEntity; static infer(this: T, args: readonly any[], indexes: any, recurse: any, entities?: any): NormalizedEntity; static denormalize(this: T, input: any, unvisit: any): [ AbstractInstanceType, boolean, boolean ]; static readonly __defaults: any; /*All instance defaults set */ static readonly defaults: any; } type NormalizedEntity = T extends { prototype: infer U; schema: infer S; } ? { [K in Exclude]: U[K]; } & { [K in keyof S]: string; } : never; export {}; //# sourceMappingURL=SimpleRecord.d.ts.map