Skip to content

Commit 647ad1a

Browse files
committed
fix: linting errors
1 parent 9b01744 commit 647ad1a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/helper-functions.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
type TPredicate = (value: any) => boolean
12
/**
23
* finds array index of array object which matches predicate
34
* @param array {Array}
45
* @param predicate {Function}
56
* @returns {number} || {undefined}
67
*/
7-
export const findIndex = (array: any[], predicate: Function) => {
8+
export const findIndex = (array: any[], predicate: TPredicate): number => {
89
const length = array == null ? 0 : array.length;
910
if (!length) {
1011
return -1;
@@ -41,7 +42,7 @@ export const compact = (array: any[]) => {
4142
* @param predicate {Function}
4243
* @returns {any} || {undefined}
4344
*/
44-
export const find = (array: any[], predicate: Function) => {
45+
export const find = (array: any[], predicate: TPredicate) => {
4546
const length = array == null ? 0 : array.length;
4647
if(!length) {
4748
return undefined;

src/method-call-validator/method-not-found-error.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default class MethodNotFoundError implements Error {
1515
constructor(
1616
public methodName: string,
1717
public openrpcDocument: OpenRPC,
18-
public receievedParams: any[] | object = [],
18+
public receievedParams: any[] | Record<string, unknown> = [],
1919
) {
2020
const msg = [
2121
`Method Not Found Error for OpenRPC API named "${openrpcDocument.info.title}"`,

0 commit comments

Comments
 (0)