MCPcopy Index your code
hub / github.com/loopbackio/loopback-next / main

Function main

examples/context/src/custom-inject-resolve.ts:48–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46const GREETER = BindingKey.create<Greeter>('greeter');
47
48export async function main() {
49 const ctx = new Context('invocation-context');
50 ctx.bind(GREETER).toClass(Greeter);
51 const greeter = await ctx.get(GREETER);
52 console.log(greeter.hello());
53}
54
55if (require.main === module) {
56 main().catch(err => {

Callers 1

Calls 5

bindMethod · 0.95
getMethod · 0.95
toClassMethod · 0.80
logMethod · 0.65
helloMethod · 0.65

Tested by

no test coverage detected