Skip to content

Commit

Permalink
Merge pull request #141 from ahrjarrett/@ahrjarrett/v0.44.2
Browse files Browse the repository at this point in the history
fix: account for contravariance in index signature of `any.dict`
  • Loading branch information
ahrjarrett authored May 26, 2024
2 parents 7b75a80 + 65cbdb5 commit 24a19fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/any/any.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ export type any_type<type extends any_nullable | any_nonnullable = any_nullable
export type any_key<type extends string | number = string | number> = type
export type any_scalar = string | number | boolean | null

export interface any_dict<type = _> { [ix: keyof never]: type }
export interface any_dict<type = _> { [ix: string]: type }
export type any_array<type = _> = readonly type[]
/** @ts-expect-error */
export interface any_object<type extends object = object> extends id<type> { }
Expand Down
2 changes: 1 addition & 1 deletion src/object/object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export declare namespace signature {
<A, B>(guard: any.typeguard<A, B>): <const T extends any.dict<A>>(object: T) => filter.values<T, B>
<A>(predicate: some.predicate<A>): <const T extends any.dict<A>>(object: T) => filter.values<T, A>
<A, B, const T extends any.dict<A>>(object: T, guard: any.typeguard<A, B>): filter.values<T, B>
<A, const T extends any.dict<A>>(object: T, predicate: some.predicate<A>,): filter.values<T, A>
<A, const T extends any.dict<A>>(object: T, predicate: some.predicate<A>): filter.values<T, A>
}

/** @experimental */
Expand Down

0 comments on commit 24a19fd

Please sign in to comment.