Code
import { Module } from '@favy/di';
const Greeting = Module<{ name: string }>()(
'Greeting',
({ name }) => `Hello, ${name}!`,
);
console.log(Greeting({ name: 'Ada' })); // Hello, Ada!Console
Run code to see output.
import { Module } from '@favy/di';
const Greeting = Module<{ name: string }>()(
'Greeting',
({ name }) => `Hello, ${name}!`,
);
console.log(Greeting({ name: 'Ada' })); // Hello, Ada!