TS4081
Exported type alias 'MyReturnType' has or is using private name 'getSdk'.
Broken Code ❌
export type MyReturnType = ReturnType<typeof getSdk>;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:
import { getSdk } from './getSdk';
export type MyReturnType = ReturnType<typeof getSdk>;export function getSdk() {}