MCPcopy Create free account
hub / github.com/bridge-codes/bridge / constructor

Method constructor

packages/bridge/source/routes/method.ts:19–29  ·  view source on GitHub ↗
(
    public methods: {
      GET?: BHGet;
      POST?: BHPost;
      PATCH?: BHPatch;
      PUT?: BHPut;
      DELETE?: BHDelete;
    },
  )

Source from the content-addressed store, hash-verified

17 };
18
19 constructor(
20 public methods: {
21 GET?: BHGet;
22 POST?: BHPost;
23 PATCH?: BHPatch;
24 PUT?: BHPut;
25 DELETE?: BHDelete;
26 },
27 ) {
28 if (methods.GET?.config.bodySchema) throw Error("You can't have a body with a GET endpoint");
29 }
30}
31
32export const isBridgeMethod = (obj: any): obj is BridgeMethod<any, any, any, any, any> =>

Callers

nothing calls this directly

Calls 1

ErrorInterface · 0.85

Tested by

no test coverage detected