Skip to content

Commit 069e8ac

Browse files
committed
Fixed 28
1 parent da01bbb commit 069e8ac

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/04-conditional-types-and-infer/28-distributive-conditional-types.problem.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import { Equal, Expect } from "../helpers/type-utils";
22

33
type Fruit = "apple" | "banana" | "orange";
44

5-
type AppleOrBanana = Fruit extends "apple" | "banana"
6-
? "apple" | "banana"
7-
: never;
5+
type AppleOrBanana = Fruit extends "apple" | "banana" ? Fruit : never;
86

97
type tests = [Expect<Equal<AppleOrBanana, "apple" | "banana">>];

0 commit comments

Comments
 (0)