mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor(aio): add assertNotMissingOrEmpty() helper
This commit is contained in:
committed by
Chuck Jazdzewski
parent
c8d87a936b
commit
c5644e5a0d
@@ -3,16 +3,14 @@ import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import * as shell from 'shelljs';
|
||||
import {GithubPullRequests} from '../common/github-pull-requests';
|
||||
import {assertNotMissingOrEmpty} from '../common/utils';
|
||||
|
||||
// Classes
|
||||
export class BuildCleaner {
|
||||
// Constructor
|
||||
constructor(protected buildsDir: string, protected repoSlug: string, protected githubToken?: string) {
|
||||
if (!buildsDir) {
|
||||
throw new Error('Missing required parameter \'buildsDir\'!');
|
||||
} else if (!repoSlug) {
|
||||
throw new Error('Missing required parameter \'repoSlug\'!');
|
||||
}
|
||||
assertNotMissingOrEmpty('buildsDir', buildsDir);
|
||||
assertNotMissingOrEmpty('repoSlug', repoSlug);
|
||||
}
|
||||
|
||||
// Methods - Public
|
||||
|
||||
Reference in New Issue
Block a user