Skip to content

Commit

Permalink
fix: rename _velone to _velona
Browse files Browse the repository at this point in the history
  • Loading branch information
solufa committed Jul 29, 2020
1 parent 3807a70 commit 441e133
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
type Deps<T extends Record<string, any>> = {
[P in keyof T]: T[P] extends { _velone: boolean }
[P in keyof T]: T[P] extends { _velona: boolean }
? (...deps: Parameters<T[P]>) => ReturnType<T[P]>
: T[P]
}
Expand All @@ -9,7 +9,7 @@ export const depend = <T extends Record<string, any>, U extends [] | [any, ...an
cb: (deps: Deps<T>, ...params: U) => V
) => {
const fn = (...args: U) => cb(dependencies, ...args)
fn._velone = true
fn._velona = true
fn.inject = (deps: Deps<T>) => (...args: U) => cb(deps, ...args)
return fn
}

0 comments on commit 441e133

Please sign in to comment.