PHP WebShell

Текущая директория: /opt/BitGoJS/modules/sdk-core/dist/src/bitgo/utils

Просмотр файла: decode.d.ts

import * as E from 'fp-ts/Either';
import * as t from 'io-ts';
/**
 * Format an `Errors` object as a human-readable `string`. See `decode` in `decode.ts` for an example.
 * Inspired by
 * https://github.com/mmkal/ts/blob/94a9ba8f2931c9c91122d00b0bf1bd21b2be05cd/packages/io-ts-extra/src/reporters.ts#L11.
 */
export declare const validationErrors: (typeAlias: string) => (errors: t.Errors) => string;
export declare function decode<A, O, I>(codecName: string, codec: t.Type<A, O, I>, u: I): E.Either<string, A>;
/**
 * Decodes input `value` with `codec`. When decoding fails, calls the `orElse` function with the error message from
 * `validationErrors`.
 */
export declare function decodeOrElse<A, O, I, E>(codecName: string, codec: t.Type<A, O, I>, value: I, orElse: (errors: string) => E): E | A;
//# sourceMappingURL=decode.d.ts.map

Выполнить команду


Для локальной разработки. Не используйте в интернете!