Skip to content

Commit e2a712a

Browse files
committed
refactor(definitions): deprecate the legacy interface aliases
Each alias now carries @deprecated naming its contract, so the call sites still resolving services by legacy name are flagged in-editor - the compile-time counterpart of the runtime deprecation tracer. The aliases themselves stay: they keep existing annotations compiling until each service migrates.
1 parent 58ef1aa commit e2a712a

7 files changed

Lines changed: 14 additions & 0 deletions

File tree

lib/common/declarations.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ declare module Server {
167167
error?: Error;
168168
}
169169

170+
/** @deprecated Kept so existing annotations compile; use the {@link HttpClient} contract. */
170171
interface IHttpClient extends HttpClient {}
171172

172173
interface IRequestResponseData {
@@ -215,6 +216,7 @@ interface IReadFileOptions {
215216
flag?: string;
216217
}
217218

219+
/** @deprecated Kept so existing annotations compile; use the {@link FileSystem} contract. */
218220
interface IFileSystem extends FileSystem {}
219221

220222
// duplicated from fs.Stats, because I cannot import it here
@@ -245,6 +247,7 @@ interface IOpener {
245247
open(filename: string, appname?: string): void;
246248
}
247249

250+
/** @deprecated Kept so existing annotations compile; use the {@link Errors} contract. */
248251
interface IErrors extends Errors {}
249252

250253
interface IFailOptions {
@@ -280,6 +283,7 @@ interface ICancellationService extends IDisposable {
280283
end(name: string): void;
281284
}
282285

286+
/** @deprecated Kept so existing annotations compile; use the {@link ChildProcess} contract. */
283287
interface IChildProcess extends ChildProcess {}
284288

285289
interface IExecOptions {
@@ -681,6 +685,7 @@ interface ISysInfo {
681685
getXcodeWarning(): Promise<string>;
682686
}
683687

688+
/** @deprecated Kept so existing annotations compile; use the {@link HostInfo} contract. */
684689
interface IHostInfo extends HostInfo {}
685690

686691
// tslint:disable-next-line:interface-name
@@ -817,6 +822,7 @@ interface IDashedOption {
817822
* Code behind of the "doctor" command
818823
* @interface
819824
*/
825+
/** @deprecated Kept so existing annotations compile; use the {@link DoctorService} contract. */
820826
interface IDoctorService extends DoctorService {}
821827

822828
interface IUtils {

lib/common/definitions/logger.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ declare global {
1515
appenderOptions?: IAppenderOptions;
1616
}
1717

18+
/** @deprecated Kept so existing annotations compile; use the {@link Logger} contract. */
1819
interface ILogger extends Logger {}
1920

2021
interface Log4JSAppenderConfiguration extends Configuration {

lib/common/definitions/mobile.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,7 @@ declare global {
588588
[platform: string]: string;
589589
}
590590

591+
/** @deprecated Kept so existing annotations compile; use the {@link DevicesService} contract. */
591592
interface IDevicesService extends DevicesService {}
592593

593594
interface IPickSingleDeviceOptions {

lib/declarations.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ interface INodePackageManager {
110110
getCachePath(): Promise<string>;
111111
}
112112

113+
/** @deprecated Kept so existing annotations compile; use the {@link PackageManager} contract. */
113114
interface IPackageManager extends PackageManager {}
114115

115116
interface IPerformanceService {
@@ -971,6 +972,7 @@ interface IVersionsService {
971972
/**
972973
* Describes methods for project name.
973974
*/
975+
/** @deprecated Kept so existing annotations compile; use the {@link ProjectNameService} contract. */
974976
interface IProjectNameService extends ProjectNameService {}
975977

976978
/**

lib/definitions/project.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,10 @@ interface INsConfig {
211211
buildPath?: string;
212212
}
213213

214+
/** @deprecated Kept so existing annotations compile; use the {@link ProjectData} contract. */
214215
interface IProjectData extends ProjectData {}
215216

217+
/** @deprecated Kept so existing annotations compile; use the {@link ProjectDataService} contract. */
216218
interface IProjectDataService extends ProjectDataService {}
217219

218220
interface IProjectCleanupService {

lib/definitions/prompter.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { Prompter } from "../contracts/prompter";
22

33
declare global {
4+
/** @deprecated Kept so existing annotations compile; use the {@link Prompter} contract. */
45
interface IPrompter extends Prompter {}
56
}

lib/definitions/temp-service.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ export type AffixOptions = {
99
/**
1010
* Declares wrapped functions of temp module
1111
*/
12+
/** @deprecated Kept so existing annotations compile; use the {@link TempService} contract. */
1213
export interface ITempService extends TempService {}

0 commit comments

Comments
 (0)