MCPcopy
hub / github.com/loopbackio/loopback-next / sayHello

Function sayHello

examples/context/src/injection-without-binding.ts:28–31  ·  view source on GitHub ↗

* Create an instance for `Greeter` with the given context and run `hello()` * @param ctx Context object

(ctx: Context)

Source from the content-addressed store, hash-verified

26 * @param ctx Context object
27 */
28async function sayHello(ctx: Context) {
29 const greeter = await instantiateClass(Greeter, ctx);
30 console.log(greeter.hello());
31}
32
33export async function main() {
34 const ctx = new Context('invocation-context');

Callers 1

mainFunction · 0.85

Calls 3

instantiateClassFunction · 0.90
logMethod · 0.65
helloMethod · 0.65

Tested by

no test coverage detected