You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Mock inversify plugindeclarefunctioninverisfyPlugin(options: {container: Container;controllers: interfaces.ServiceIdentifier[];}): (app: NammathamApp,handlerResolver: BaseHandlerResolver)=>void;// Manually register controllers// const homeController = new HomeController(container.get(DataService));// app.addFunctions(homeController.hello);// Automatically register controllers// This way will remove end-to-end type safetyapp.register(inverisfyPlugin({ container,controllers: [HomeController]}));
Before
app.addFunctions(blob,hello);
After
Note: remove function name from httpGet first arg
exportconstmyApp=app.addFunctions({ blob, hello });// Register functions via object, may support type infer in the future// type Endpoint = InferEndpoint<typeof myApp>constuserFunction=app.createFunctions({user: func.httpGet().handler(({ res })=>res.text('OK'));});
The text was updated successfully, but these errors were encountered:
Poc in
main.controller-inverify-plugin
https://github.com/thaitype/nammatham/blob/main.controller-inverify-plugin/examples/azure-functions-class-controller/src/main.ts
Before
After
Note: remove function name from
httpGet
first argThe text was updated successfully, but these errors were encountered: