UNPKG

fhirbuilder

Version:
28 lines (27 loc) 1.19 kB
import { ICoding, IElement } from 'fhirtypes/dist/r4'; import { Meta } from '../../models'; import { IBuildable } from '../base/IBuildable'; import { UnderscoreKeys } from '../base/resource-type-map.interface'; import { ElementBuilder } from '../base/ElementBuilder'; type PrimitiveExtensionFields = keyof Pick<Meta, UnderscoreKeys<Meta>>; interface IMetaBuilder extends IBuildable<Meta> { setSource(source: string): this; setVersionId(versionId: string | number): this; setLastUpdated(lastUpdated: string): this; addTag(tag: ICoding): this; addProfile(profile: string): this; addSecurity(security: ICoding): this; } export declare class MetaBuilder extends ElementBuilder implements IMetaBuilder { private readonly meta; constructor(); addPrimitiveExtension<T extends PrimitiveExtensionFields>(param: T, extension: T extends '_profile' ? IElement[] : IElement): this; setSource(source: string): this; setVersionId(versionId: string | number): this; setLastUpdated(lastUpdated: string): this; addTag(tag: ICoding): this; addProfile(profile: string): this; addSecurity(security: ICoding): this; build(): Meta; } export {};