TypeScript/tests/cases/fourslash/formattingConditionalTypes.ts
Priyantha Lankapura 79dde93068 Fix formatting of conditional types (#21762)
* Add test for formatting of conditional types

* Fix formatting of conditional types
2018-02-08 09:28:38 -08:00

12 lines
380 B
TypeScript

/// <reference path='fourslash.ts'/>
/////*L1*/type Diff1<T, U> = T extends U?never:T;
/////*L2*/type Diff2<T, U> = T extends U ? never : T;
format.document();
goTo.marker("L1");
verify.currentLineContentIs("type Diff1<T, U> = T extends U ? never : T;");
goTo.marker("L2");
verify.currentLineContentIs("type Diff2<T, U> = T extends U ? never : T;");