Skip to content

Commit 91684ae

Browse files
fix: Fix ESLint errors
1 parent e5824a7 commit 91684ae

File tree

3 files changed

+20
-11
lines changed

3 files changed

+20
-11
lines changed

lib/near-bindgen.d.ts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/near-bindgen.js

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/near-bindgen.ts

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,29 @@ import { deserialize, serialize } from "./utils";
33

44
type EmptyParameterObject = Record<never, never>;
55
type 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

1213
export 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

2123
export 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

Comments
 (0)