Skip to content

createApiContractSchemaBuilders

Binds the Standard Schema vendor once, so a contract does not pass it to every schema builder. Destructure the result under the builders’ own names and the calls read exactly as the unbound ones do:

const { createArgumentsSchema, createTypeGuardSchema } = createApiContractSchemaBuilders('my-plugin');

Import:

import { createApiContractSchemaBuilders } from '@mnaoumov/typescript-lib/api-contract';

Signature:

function createApiContractSchemaBuilders(vendor: string): ApiContractSchemaBuilders

Parameters:

Parameter Type Description
vendor string The vendor every schema reports.

Returns: ApiContractSchemaBuilders — The bound builders.


Links to this page: