UNPKG

payload-rest-client

Version:

A typesafe rest api client for the payload cms.

19 lines 614 B
"use strict"; // type Input<P, Q, B> = { // params?: P, // query?: Q, // body?: B, // } // class CEBuilder<I extends Input<any, any, any>, O> { // constructor(private readonly urlFactory: (params: I["params"]) => string) { } // make() { // return (input: I): O => { // console.log(input) // console.log(this.urlFactory(input.params)) // return {} as any; // }; // } // } // const ce = new CEBuilder<{ params: { id: number } }, string>(p => `getSomethingById/${p.id}`).make() // ce({ params: { id: 1 } }); //# sourceMappingURL=test3.js.map