@@ -3,26 +3,29 @@ import { deserialize, serialize } from "./utils";
33
44type EmptyParameterObject = Record < never , never > ;
55type AnyObject = Record < string , unknown > ;
6- type DecoratorFunction = < Function extends ( ...args : any ) => any > (
6+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
7+ type DecoratorFunction = < AnyFunction extends ( ...args : any ) => any > (
78 target : object ,
89 key : string | symbol ,
9- descriptor : TypedPropertyDescriptor < Function >
10+ descriptor : TypedPropertyDescriptor < AnyFunction >
1011) => void ;
1112
1213export function initialize ( _empty : EmptyParameterObject ) : DecoratorFunction {
13- return function < Function extends ( ...args : any ) => any > (
14+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
15+ return function < AnyFunction extends ( ...args : any ) => any > (
1416 _target : object ,
1517 _key : string | symbol ,
16- _descriptor : TypedPropertyDescriptor < Function >
18+ _descriptor : TypedPropertyDescriptor < AnyFunction >
1719 // eslint-disable-next-line @typescript-eslint/no-empty-function
1820 ) : void { } ;
1921}
2022
2123export function view ( _empty : EmptyParameterObject ) : DecoratorFunction {
22- return function < Function extends ( ...args : any ) => any > (
24+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
25+ return function < AnyFunction extends ( ...args : any ) => any > (
2326 _target : object ,
2427 _key : string | symbol ,
25- _descriptor : TypedPropertyDescriptor < Function >
28+ _descriptor : TypedPropertyDescriptor < AnyFunction >
2629 // eslint-disable-next-line @typescript-eslint/no-empty-function
2730 ) : void { } ;
2831}
@@ -34,17 +37,19 @@ export function call({
3437 privateFunction ?: boolean ;
3538 payableFunction ?: boolean ;
3639} ) : DecoratorFunction {
37- return function < Function extends ( ...args : any ) => any > (
40+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
41+ return function < AnyFunction extends ( ...args : any ) => any > (
3842 _target : object ,
3943 _key : string | symbol ,
40- descriptor : TypedPropertyDescriptor < Function >
44+ descriptor : TypedPropertyDescriptor < AnyFunction >
4145 ) : void {
4246 const originalMethod = descriptor . value ;
4347
48+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
4449 // @ts -ignore
4550 descriptor . value = function (
46- ...args : Parameters < Function >
47- ) : ReturnType < Function > {
51+ ...args : Parameters < AnyFunction >
52+ ) : ReturnType < AnyFunction > {
4853 if (
4954 privateFunction &&
5055 near . predecessorAccountId ( ) !== near . currentAccountId ( )
0 commit comments