zhaojinyu e984acc6d0 first commit 10 tháng trước cách đây
..
dist e984acc6d0 first commit 10 tháng trước cách đây
esm e984acc6d0 first commit 10 tháng trước cách đây
fesm e984acc6d0 first commit 10 tháng trước cách đây
react-bindings e984acc6d0 first commit 10 tháng trước cách đây
LICENSE e984acc6d0 first commit 10 tháng trước cách đây
README.md e984acc6d0 first commit 10 tháng trước cách đây
package.json e984acc6d0 first commit 10 tháng trước cách đây

README.md

redi

Stars Downloads License Codecov

A dependency library for TypeScript and JavaScript, along with a binding for React.

Overview

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.

Links

Users

  • Univer
  • Team Lark at ByteDance

License

MIT. Copyright 2021-present Wenzhao Hu.