import { injectable } from 'tsyringe'; import { GitHubProvider } from '../providers'; interface TemplateGitHubClientConstructor { accessToken: string; } @injectable() export class TemplateGitHubClient extends GitHubProvider { private _initialized = false; constructor(args?: TemplateGitHubClientConstructor) { super({ ...args, repository: 'templates', }); if (!this._initialized && !args?.accessToken) { throw new Error( 'TemplateGitHubClient > constructor error: TemplateGitHubClient is not initialized and accessToken is empty', ); } this._initialized = true; } }