Skip to content

Commit 58ef1aa

Browse files
committed
refactor(services): implement the contracts directly
Both services already carry the Impl suffix, so the contract name is free and the alias import the implements clause needed is not.
1 parent 2f9f2e0 commit 58ef1aa

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/services/doctor-service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ import {
88
NODE_MODULES_FOLDER_NAME,
99
TNS_CORE_MODULES_NAME,
1010
} from "../constants";
11+
import { DoctorService } from "../contracts/doctor-service";
1112
import { doctor, constants } from "@nativescript/doctor";
1213
import { IProjectDataService } from "../definitions/project";
1314
import { IVersionsService, IOptions } from "../declarations";
1415
import { IPlatformEnvironmentRequirements } from "../definitions/platform";
1516
import {
16-
IDoctorService,
1717
IAnalyticsService,
1818
IHostInfo,
1919
IChildProcess,
@@ -27,7 +27,7 @@ import { injector } from "../common/yok";
2727
import { color } from "../color";
2828
import { ITerminalSpinnerService } from "../definitions/terminal-spinner-service";
2929

30-
export class DoctorServiceImpl implements IDoctorService {
30+
export class DoctorServiceImpl implements DoctorService {
3131
private static DarwinSetupScriptLocation = path.join(
3232
__dirname,
3333
"..",

lib/services/project-name-service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { isInteractive } from "../common/helpers";
2-
import { IProjectNameService } from "../declarations";
32
import { IErrors } from "../common/declarations";
43
import * as _ from "lodash";
4+
import { ProjectNameService } from "../contracts/project-name-service";
55
import { injector } from "../common/yok";
66

7-
export class ProjectNameServiceImpl implements IProjectNameService {
7+
export class ProjectNameServiceImpl implements ProjectNameService {
88
constructor(
99
private $projectNameValidator: IProjectNameValidator,
1010
private $errors: IErrors,

0 commit comments

Comments
 (0)