TS4081

Exported type alias 'MyReturnType' has or is using private name 'getSdk'.

Broken Code ❌

index.ts
export type MyReturnType = ReturnType<typeof getSdk>;
getSdk.ts
function getSdk() {}

Fixed Code ✔️

The getSdk is identified to be private because it is not exported. If we export the getSdk function, we won't have any more problems:

index.ts
import { getSdk } from './getSdk';
 
export type MyReturnType = ReturnType<typeof getSdk>;
getSdk.ts
export function getSdk() {}