Skip to content

Commit 9b9b6d6

Browse files
committed
Restore string check and trailing newline
1 parent dd963a3 commit 9b9b6d6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/material-ui-types/index.d.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,14 @@ export type And<A, B, C = true> = (A | B | C) extends true ? true : false;
6464
* @internal
6565
*
6666
* check if a type is `{}`
67+
*
68+
* 1. false if the given type has any members
69+
* 2. false if the type is `object` which is the only other type with no members
70+
* {} is a top type so e.g. `string extends {}` but not `string extends object`
71+
* 3. false if the given type is `unknown`
6772
*/
6873
export type IsEmptyInterface<T> = And<
6974
{} extends T ? true : false,
75+
string extends T ? true : false,
7076
unknown extends T ? false : true
71-
>;
77+
>;

0 commit comments

Comments
 (0)