Skip to content

Commit

Permalink
fix: type error in lazy
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack-Works committed Oct 20, 2024
1 parent 7ae325e commit e5ea13c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/blue-cherries-rhyme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@masknet/kit': patch
---

fix: type error in lazy
5 changes: 4 additions & 1 deletion src/ecmascript/lazyDecorator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
* ;@lazy accessor value = lazy.of(() => getData())
* }
*/
export function lazy<C, T>({ get, set }: ClassAccessorDecoratorTarget<C, T>): ClassAccessorDecoratorResult<C, T> {
export function lazy<C, T>(
{ get, set }: ClassAccessorDecoratorTarget<C, T>,
_: unknown,
): ClassAccessorDecoratorResult<C, T> {
function init(C: C) {
const current = get.call(C) as any
initFunctionMap ||= new WeakSet()
Expand Down

0 comments on commit e5ea13c

Please sign in to comment.