|
|
před 3 měsíci | |
|---|---|---|
| .. | ||
| dist | před 3 měsíci | |
| esm | před 3 měsíci | |
| fesm | před 3 měsíci | |
| react-bindings | před 3 měsíci | |
| LICENSE | před 3 měsíci | |
| README.md | před 3 měsíci | |
| package.json | před 3 měsíci | |
A dependency library for TypeScript and JavaScript, along with a binding for React.
import { Inject } from '@wendellhu/redi'
class AuthService {
public getCurrentUserInfo(): UserInfo {}
}
class FileListService {
constructor(@Inject(AuthService) private readonly authService: AuthService) {}
public getUserFiles(): Promise<Files> {
const currentUser = this.authService.getCurrentUserInfo()
}
}
const injector = new Injector([[AuthService], [FileListService]])
injector.get(AuthService)
View full documentation on redi.wendell.fun.
MIT. Copyright 2021-present Wenzhao Hu.