Skip to content

Commit

Permalink
Merge pull request #13 from yufeng04/fix-inject
Browse files Browse the repository at this point in the history
fix: 修改 inject 参数类型
  • Loading branch information
qiansc authored Jan 25, 2024
2 parents 19d8d31 + b66038e commit 9e81c74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/decorators/inject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { setNthDependency } from '../di/dependency';
* 声明参数的 token
*/
export function inject (token: InjectToken) {
return function inject (target: Object, propertyKey: string | symbol, parameterIndex: number) {
return function inject (target: Object, propertyKey: string | symbol | undefined, parameterIndex: number) {
if (propertyKey === undefined) {
setNthDependency(token, parameterIndex, target);
}
Expand Down

0 comments on commit 9e81c74

Please sign in to comment.