Skip to content

Commit

Permalink
feat(PropertyValue): add PropertyValue type
Browse files Browse the repository at this point in the history
  • Loading branch information
djcsdy committed Feb 21, 2023
1 parent 8328fd3 commit 935c14a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import {filter, map} from "@softwareventures/iterable";
* As of TypeScript 4.9, `Key` is equivalent to `string | number | symbol`. */
export type Key<T extends object = never> = keyof T;

/** The type of a property value of `T`. */
export type PropertyValue<T extends object> = T[keyof T];

/** The type `T`, but with any callable or newable signatures removed. */
export type NotFunction<T> = {[K in keyof T]: T[K]};

Expand Down

0 comments on commit 935c14a

Please sign in to comment.