diff --git a/src/index.ts b/src/index.ts index c70212b..7fde02b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -16,3 +16,4 @@ export * from './types/Literalize'; export * from './wrappers/withAssure'; export * from './checks/isKeyOf'; export * from './types/PickAny'; +export * from './types/Empty'; diff --git a/src/types/Empty.ts b/src/types/Empty.ts new file mode 100644 index 0000000..b3ab7bd --- /dev/null +++ b/src/types/Empty.ts @@ -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;