1
0
Fork 0

fix(remote): usage of internal gitbeaker types

This commit is contained in:
ssube 2021-04-04 15:33:30 -05:00 committed by Sean Sube
parent 20436dbd1a
commit 1e2b2a093b
1 changed files with 4 additions and 5 deletions

View File

@ -1,21 +1,20 @@
import { mustExist } from '@apextoaster/js-utils'; import { mustExist } from '@apextoaster/js-utils';
import { GetResponse } from '@gitbeaker/core/dist/types/infrastructure/RequestHelper'; import { BundleType } from '@gitbeaker/core/dist/types/infrastructure/Utils';
import { Bundle } from '@gitbeaker/core/dist/types/infrastructure/Utils';
import { IssueNotes, Issues, Labels, Projects, ProjectsBundle } from '@gitbeaker/node'; import { IssueNotes, Issues, Labels, Projects, ProjectsBundle } from '@gitbeaker/node';
import { CommentUpdate, IssueUpdate, LabelUpdate, ProjectQuery, Remote, RemoteOptions } from '.'; import { CommentUpdate, IssueUpdate, LabelUpdate, ProjectQuery, Remote, RemoteOptions } from '.';
import { BaseRemote } from './base'; import { BaseRemote } from './base';
// gitbeaker exports the bundle types as const, breaking typeof // gitbeaker exports the bundle types as const, breaking typeof
type RemoteBundle = InstanceType<Bundle<{ type RemoteBundle = InstanceType<BundleType<{
Issues: typeof Issues; Issues: typeof Issues;
IssueNotes: typeof IssueNotes; IssueNotes: typeof IssueNotes;
Labels: typeof Labels; Labels: typeof Labels;
Projects: typeof Projects; Projects: typeof Projects;
}, 'Issues' | 'IssueNotes' | 'Labels' | 'Projects'>>; }, 'Issues' | 'IssueNotes' | 'Labels' | 'Projects'>>;
export function unwrapResponse<T>(resp: GetResponse): T { export function unwrapResponse<T>(resp: unknown): T {
return (resp as unknown) as T; return resp as T;
} }
/** /**