(
endpoint: Narrow<E>
)
| 208 | export class Builder<T extends ZodiosEndpointDefinitions> { |
| 209 | constructor(private api: T) {} |
| 210 | addEndpoint<E extends ZodiosEndpointDefinition>( |
| 211 | endpoint: Narrow<E> |
| 212 | ): Builder<[...T, E]> { |
| 213 | if (this.api.length === 0) { |
| 214 | this.api = [endpoint] as T; |
| 215 | return this as any; |
| 216 | } |
| 217 | this.api = [...this.api, endpoint] as any; |
| 218 | return this as any; |
| 219 | } |
| 220 | build(): T { |
| 221 | checkApi(this.api!); |
| 222 | return this.api!; |
no outgoing calls
no test coverage detected