Skip to content

Commit

Permalink
Merge pull request #160 from ahrjarrett/@ahrjarrett/v0.47.0-pt-2
Browse files Browse the repository at this point in the history
v0.47.0 [cont'd]: (re-exports `some.instanceOf`, adds `any.maybeIndexedBy`)
  • Loading branch information
ahrjarrett authored Jun 23, 2024
2 parents 00c69ba + 350fd9f commit 4cc480e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/neat-melons-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"any-ts": patch
---

fix: re-exports `some.instanceOf`; feat: adds `any.maybeIndexedBy`
7 changes: 7 additions & 0 deletions src/any/any.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,13 @@ declare namespace any {
= { [ix in invariant]: _ }
> = type

export type maybeIndexedBy<
invariant extends any.index,
type extends
| { [ix in invariant]+?: _ }
= { [ix in invariant]+?: _ }
> = type

export type indexableBy<
invariant extends any.index,
type extends
Expand Down
2 changes: 2 additions & 0 deletions src/some/some.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ export declare namespace some {
some_fieldOf as fieldOf,
/** {@link some_subtypeOf `some.subtypeOf`} @external */
some_subtypeOf as subtypeOf,
/** {@link some_instanceOf `some.instanceOf`} @external */
some_instanceOf as instanceOf,
}
}

Expand Down

0 comments on commit 4cc480e

Please sign in to comment.