I found the answer in an old issue of gitbeaker. You can use:
import { Gitlab } from '@gitbeaker/core' ... const gitLabApi: InstanceType<Gitlab<false>> = await createGitLabApi(repoId)