Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/tapi/src/core/BuildConfiguration.ts>default

Consume APIs and convert them to TypeScript objects
Latest
class default
import { default } from "https://deno.land/x/tapi@v0.5.1/src/core/BuildConfiguration.ts";

Type Parameters

ResultType

Properties

readonly
aliases: { [localPath: string]: string; }

Collection of aliases. Each alias represents an alternative name for the property in the incoming object.

readonly
ignores: Set<string>

List of parameters that need to be ignored.

readonly
listElementConstructors: { [localPath: string]: ResultType; }

Collection of list element constructors. This is used to define how to construct the individual items of an incoming list.

required: Set<string>

List of required parameters

readonly
transformers: { [localPath: string]: ValueTransformer; }

Collection of transformers. Each transformer is a callback function associated to a property, this gets called just before the property is assigned to the base object.

Methods

alias(foreignPath: string, localPath: string): this

Add an alias for a given property.

ignore(...paths: string[]): this

Add an ignore directive for one or more paths.

listType(localPath: string, builtObject: ResultType): this

Add a list item type to let the builder know how to construct the elements of a list.

require(...paths: string[]): this

Add a required directive for one or more paths.

transform(
localPath: string,
transformerIn: Action,
transformerOut?: Action,
): this

Add a transform directive for a given path.