import { Entity } from '@rest-hooks/endpoint'; import { AbstractInstanceType } 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 EntityRecord extends Entity { toString(): string; /** 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>): AbstractInstanceType; /** Creates new instance copying over defined values of arguments */ static mergeRecord(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>[]; /** Used by denormalize to set nested members */ protected static set(entity: any, key: string, value: any): void; } export {}; //# sourceMappingURL=EntityRecord.d.ts.map