import {expectAssignable, expectError, expectType} from 'tsd'; import type {EmptyObject, IsEmptyObject} from '../index'; declare let foo: EmptyObject; expectAssignable<{}>(foo); expectAssignable<{}>(foo = {}); expectError(foo = []); expectError(foo = {x: 1}); expectError(foo = 42); expectError(foo = null); expectError(foo.bar = 42); expectError(foo.bar = {}); expectType>(true); expectType>(true); expectType>(false); expectType>(false); expectType void>>(false); type Union = EmptyObject | {id: number}; const bar: Union = {}; expectError(bar.id); const baz: Union = {id: 42}; expectType<{id: number}>(baz);