UNPKG

@thisisagile/easy-test

Version:

Straightforward library for testing microservices built with @thisisagile/easy

1 lines 1.26 kB
{"version":3,"sources":["../src/utils/Types.ts"],"sourcesContent":["import { asString, isFunction } from './Utils';\n\nexport type OneOrMore<T> = T | Array<T>;\n\nexport type ArrayLike<T> = OneOrMore<T>[];\n\nexport type Constructor<T> = { new (...args: any[]): T };\n\nexport type Message<P> = Text | ((...params: P[]) => Text);\n\nexport const toMessage = <P>(g: Message<P>, ...params: P[]): string => asString(isFunction(g) ? g(...params) : g);\n\nexport type Validatable = { isValid: boolean };\n\nexport type Result = { domain?: string; location?: string; message: string };\n\nexport type Results = Validatable & { results: Result[] };\n\nexport type Uri = Text;\n\nexport type Id = string | number;\n\nexport type JsonValue = string | number | boolean | null | Json | JsonValue[];\n\nexport type Json = { [key: string]: JsonValue };\n\nexport type Exception = { id: Id; reason?: string };\n\nexport type Text = { toString: () => string };\n\nexport type Query = Text;\n\nexport type UseCase = { app: { id: Text }; id: Text };\n\nexport type Tester = { url: string };\n\nexport type CreateMutable<T> = { -readonly [P in keyof T]: T[P] };\n"],"mappings":";;;;;;AAUO,IAAM,YAAY,CAAI,MAAkB,WAAwB,SAAS,WAAW,CAAC,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC;","names":[]}