Skip to content

Fix abstract coder filter and map types #4596

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib.esm/abi/coders/abstract-coder.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type { BigNumberish, BytesLike } from "../../utils/index.js";
* @_ignore:
*/
export declare const WordSize: number;
type Cast<T, U> = T extends U ? T : U;
/**
* A [[Result]] is a sub-class of Array, which allows accessing any
* of its values either positionally by its index or, if keys are
Expand Down Expand Up @@ -38,11 +39,11 @@ export declare class Result extends Array<any> {
/**
* @_ignore
*/
filter(callback: (el: any, index: number, array: Result) => boolean, thisArg?: any): Result;
filter<This = undefined>(predicate: (this: This, value: any, index: number, array: this) => boolean, thisArg?: This): any[];
/**
* @_ignore
*/
map<T extends any = any>(callback: (el: any, index: number, array: Result) => T, thisArg?: any): Array<T>;
map<U, This = undefined>(callbackfn: (this: This, value: any, index: number, array: this) => U, thisArg?: This): Cast<{ [K in keyof this]: U }, U[]>;
/**
* Returns the value for %%name%%.
*
Expand Down