Skip to content

Commit

Permalink
feat(types): expose the Empty type
Browse files Browse the repository at this point in the history
  • Loading branch information
uladkasach committed Aug 30, 2024
1 parent e67d521 commit 507fdb8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ export * from './types/Literalize';
export * from './wrappers/withAssure';
export * from './checks/isKeyOf';
export * from './types/PickAny';
export * from './types/Empty';
8 changes: 8 additions & 0 deletions src/types/Empty.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* the shape of an empty object
*
* usecase
* - the type `{}` unfortunately actually means "anything not null and not undefined" in typescript
* - this exposes a type that represents a literal Empty object
*/
export type Empty = Record<string, never>;

0 comments on commit 507fdb8

Please sign in to comment.