import { Promiseable } from '../../libs/promises/promises.js'; type Encoder = SyncEncoder | AsyncEncoder; interface SyncEncoder { stringify(input: I): O; } interface AsyncEncoder { stringify(input: I): Promiseable; } type Bicoder = SyncBicoder | AsyncBicoder; interface SyncBicoder { stringify(input: I): O; parse(output: O): I; } interface AsyncBicoder { stringify(input: I): Promiseable; parse(output: O): Promiseable; } declare namespace SyncIdentity { function stringify(value: T): T; function parse(value: T): T; } declare class AsyncPipeBicoder implements AsyncBicoder { readonly outer: AsyncBicoder; readonly inner: AsyncBicoder; constructor(outer: AsyncBicoder, inner: AsyncBicoder); stringify(input: I): Promise; parse(output: O): Promise; } declare class AsyncPipeEncoder implements AsyncEncoder { readonly outer: AsyncEncoder; readonly inner: AsyncEncoder; constructor(outer: AsyncEncoder, inner: AsyncEncoder); stringify(input: I): Promise; } declare class SyncPipeBicoder implements SyncBicoder { readonly outer: SyncBicoder; readonly inner: SyncBicoder; constructor(outer: SyncBicoder, inner: SyncBicoder); stringify(input: I): O; parse(output: O): I; } declare class SyncPipeEncoder implements SyncEncoder { readonly outer: SyncEncoder; readonly inner: SyncEncoder; constructor(outer: SyncEncoder, inner: SyncEncoder); stringify(input: I): O; } export { type AsyncBicoder, type AsyncEncoder, AsyncPipeBicoder, AsyncPipeEncoder, type Bicoder, type Encoder, type SyncBicoder, type SyncEncoder, SyncIdentity, SyncPipeBicoder, SyncPipeEncoder };