UNPKG

type-enhancers

Version:
17 lines (11 loc) 495 B
import { expectTypeOf } from 'vitest'; const TEST_1 = ''.trimEnd(); expectTypeOf(TEST_1).toEqualTypeOf<''>(); const TEST_2 = 'some text'.trimEnd(); expectTypeOf(TEST_2).toEqualTypeOf<'some text'>(); const TEST_3 = ' some text'.trimEnd(); expectTypeOf(TEST_3).toEqualTypeOf<' some text'>(); const TEST_4 = 'some text '.trimEnd(); expectTypeOf(TEST_4).toEqualTypeOf<'some text'>(); const TEST_5 = ' some text '.trimEnd(); expectTypeOf(TEST_5).toEqualTypeOf<' some text'>();