~~ lineWidth: 48 ~~ == should format == type Partial = { [P in keyof T] ? : T[P]; }; type OptionalPlus = { [P in keyof T]+?: T[P]; }; type OptionalMinus = { [P in keyof T]-?: T[P]; }; type Flags = { [P in keyof T]: boolean; }; type ReadOnly = { readonly [P in keyof T]: T[P]; }; type ReadOnlyPlus = { +readonly [P in keyof T]: T[P]; }; type ReadOnlyMinus = { -readonly [P in keyof T]: T[P]; }; [expect] type Partial = { [P in keyof T]?: T[P] }; type OptionalPlus = { [P in keyof T]+?: T[P]; }; type OptionalMinus = { [P in keyof T]-?: T[P]; }; type Flags = { [P in keyof T]: boolean }; type ReadOnly = { readonly [P in keyof T]: T[P]; }; type ReadOnlyPlus = { +readonly [P in keyof T]: T[P]; }; type ReadOnlyMinus = { -readonly [P in keyof T]: T[P]; }; == should format with newlines when the brace is on a different line == type Partial = { [P in keyof T]?: T[P]; }; [expect] type Partial = { [P in keyof T]?: T[P]; }; == should format with newlines when the length goes over the line width == type Partial = { [TESTINGTHIS in keyof T]?: T[TESTINGTHIS]; }; [expect] type Partial = { [TESTINGTHIS in keyof T]?: T[TESTINGTHIS]; }; == should format a mapped type with a long type annotation hanging == type Partial = { readonly [TESTINGTHISOUT in keyof T]?: T[TESTINGTHISOUT]; }; [expect] type Partial = { readonly [TESTINGTHISOUT in keyof T]?: T[TESTINGTHISOUT]; }; == should format mapped type with name type == type Test = { [K in T as U]: undefined }; [expect] type Test = { [K in T as U]: undefined; }; == should support comments at different points == type Test = { // 1 // 2 [K in T as U]: undefined; // 3 // 4 }; [expect] type Test = { // 1 // 2 [K in T as U]: undefined; // 3 // 4 }; == should put a comment after the semi-colon when adding one == type Test = { [K in T as U]: undefined // test } [expect] type Test = { [K in T as U]: undefined; // test };