UNPKG

@mos-connection/helper

Version:

Helper functions for the MOS-connection library

20 lines 904 B
import { AnyXMLValue } from '@mos-connection/model'; export declare function isEmpty(obj: unknown): boolean; export { AnyXMLObject, AnyXMLValue, AnyXMLValueSingular } from '@mos-connection/model'; /** Return true if the object has a property */ export declare function has(obj: unknown, property: string): boolean; /** * Asserts that a string type is of a certain literal. * Example usage: const str = assertStringLiteral('foo', ['foo', 'bar']) // str is of type 'foo' | 'bar' */ export declare function assertStringLiteral<T extends string>(value: string, options: T[]): value is T; /** Type assertion */ export declare function literal<T>(o: T): T; /** * Removes undefined properties from an object */ export declare function omitUndefined(obj: { [key: string]: any; }): void; export declare function flattenXMLText(xml: AnyXMLValue, strict: boolean): string; //# sourceMappingURL=lib.d.ts.map