11import { expectNever , expectType } from 'tsd' ;
2- import type { EmptyObject , UnwrapPartial } from '../index.js ' ;
2+ import type { EmptyObject , UnwrapPartial } from '../index.d.ts ' ;
33
44type TestType = {
55 a : string ;
66 b : number ;
7- }
7+ } ;
88
99expectType < TestType > ( { } as UnwrapPartial < Partial < TestType > > ) ;
1010expectType < TestType > ( { } as UnwrapPartial < { a ?: string ; b ?: number } > ) ;
@@ -41,7 +41,7 @@ expectNever({} as UnwrapPartial<TestTypeWithOptionalProps>);
4141// `UnwrapPartial` preserves nested `Partial` properties
4242type TestTypeWithPartialProp = TestType & {
4343 c : Partial < TestType > ;
44- }
44+ } ;
4545
4646expectType < TestTypeWithPartialProp > ( { } as UnwrapPartial < Partial < TestTypeWithPartialProp > > ) ;
4747expectNever ( { } as UnwrapPartial < TestTypeWithPartialProp > ) ;
@@ -57,7 +57,7 @@ expectNever({} as UnwrapPartial<TestTypeWithReadonlyProps>);
5757// `UnwirapPartial` works with methods
5858type TestTypeWithMethod = {
5959 c ( ) : void ;
60- }
60+ } ;
6161
6262expectType < TestTypeWithMethod > ( { } as UnwrapPartial < Partial < TestTypeWithMethod > > ) ;
6363expectNever ( { } as UnwrapPartial < TestTypeWithMethod > ) ;
@@ -72,7 +72,7 @@ expectNever({} as UnwrapPartial<TestType | AnotherTestType>);
7272// `UnwrapPartial` works with index signatures
7373type ArrayLikeTestType = {
7474 [ index : number ] : string ;
75- }
75+ } ;
7676
7777expectType < ArrayLikeTestType > ( { } as UnwrapPartial < Partial < ArrayLikeTestType > > ) ;
7878expectType < Record < number , string > > ( { } as UnwrapPartial < Partial < Record < number , string > > > ) ;
0 commit comments