The dependency to which transform will be applied
A function that will be called when the ComputedKey is requested. src will resolved first to provide the input to the function
A ComputedKey that resolves to the result of applying src to transform
Providing a default injection for a class:
class User {
name: string; id: number
constructor(name: string, id: number) {
this.name = name; this.id = id
}
static inject = Inject.map({
name: NameKey,
id: IdKey,
}, ({ name, id }) => new User(name, id))
}
Generated using TypeDoc
Creates a ComputedKey to provide a resource based on other dependencies.