Create a one-off type token from a factory function.
class Wizard { wand = inject( Build(() => { const wand = inject(Wand); wand.owner = this; // ... return wand; }), );} Copy
class Wizard { wand = inject( Build(() => { const wand = inject(Wand); wand.owner = this; // ... return wand; }), );}
@NO_SIDE_EFFECTS
Create a one-off type token from a factory function.