摘要:
declare const tag: unique symbol; export type EmptyObject = { [tag]?: never }; // Record<PropertyKey, never> const acceptOnlyEmptyObject = (input: Emp 阅读全文
摘要:
const acceptAnythingExceptNullOrUndefined = <T>(input: {}) => {}; acceptAnythingExceptNullOrUndefined('hello'); acceptAnythingExceptNullOrUndefined(42 阅读全文