Skip to content

Commit 6d3e0f1

Browse files
SkyZeroZxthePunderWoman
authored andcommitted
refactor(common): Removes unused imports to clean up dependencies
Eliminates unnecessary imports to reduce clutter and improve maintainability (cherry picked from commit ca3ef38)
1 parent b30bcc5 commit 6d3e0f1

File tree

30 files changed

+18
-52
lines changed

30 files changed

+18
-52
lines changed

packages/common/http/src/backend.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@ import {HttpRequest} from './request';
1212
import {HttpEvent} from './response';
1313
import {FetchBackend} from './fetch';
1414
import {HttpXhrBackend} from './xhr';
15-
import {isPlatformServer} from '@angular/common';
1615
import {
1716
EnvironmentInjector,
1817
inject,
1918
Injectable,
20-
PLATFORM_ID,
2119
ɵConsole as Console,
2220
ɵformatRuntimeError as formatRuntimeError,
2321
PendingTasks,

packages/common/http/src/resource.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import type {Subscription} from 'rxjs';
2525

2626
import {HttpRequest} from './request';
2727
import {HttpClient} from './client';
28-
import {HttpErrorResponse, HttpEventType, HttpProgressEvent, HttpResponseBase} from './response';
28+
import {HttpErrorResponse, HttpEventType, HttpProgressEvent} from './response';
2929
import {HttpHeaders} from './headers';
3030
import {HttpParams} from './params';
3131
import {HttpResourceRef, HttpResourceOptions, HttpResourceRequest} from './resource_api';

packages/compiler-cli/src/ngtsc/scope/src/component_scope.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88
import {ClassDeclaration} from '../../reflection';
99

10-
import {ComponentScope, ComponentScopeReader, LocalModuleScope, RemoteScope} from './api';
10+
import {ComponentScope, ComponentScopeReader, RemoteScope} from './api';
1111

1212
/**
1313
* A `ComponentScopeReader` that reads from an ordered set of child readers until it obtains the

packages/compiler-cli/src/ngtsc/testing/src/utils.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,7 @@
1010

1111
import ts from 'typescript';
1212

13-
import {
14-
AbsoluteFsPath,
15-
dirname,
16-
getFileSystem,
17-
getSourceFileOrError,
18-
NgtscCompilerHost,
19-
} from '../../file_system';
13+
import {AbsoluteFsPath, dirname, getFileSystem, getSourceFileOrError} from '../../file_system';
2014
import {DeclarationNode} from '../../reflection';
2115
import {getTokenAtPosition} from '../../util/src/typescript';
2216

packages/compiler-cli/src/ngtsc/tsc_plugin.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import {AbsoluteFsPath, NodeJSFileSystem, resolve, setFileSystem} from './file_s
2020
import {PatchedProgramIncrementalBuildStrategy} from './incremental';
2121
import {ActivePerfRecorder, PerfPhase} from './perf';
2222
import {TsCreateProgramDriver} from './program_driver';
23-
import {untagAllTsFiles} from './shims';
2423
import {OptimizeFor} from './typecheck/api';
2524

2625
// The following is needed to fix a the chicken-and-egg issue where the sync (into g3) script will

packages/compiler-cli/src/ngtsc/typecheck/api/scope.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import ts from 'typescript';
1010

11-
import {EmittedReference, Reference} from '../../imports';
11+
import {Reference} from '../../imports';
1212
import {ClassDeclaration} from '../../reflection';
1313
import {SymbolWithValueDeclaration} from '../../util/src/typescript';
1414

packages/compiler-cli/src/ngtsc/typecheck/src/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ import {TypeCheckShimGenerator} from './shim';
106106
import {DirectiveSourceManager} from './source';
107107
import {findTypeCheckBlock, getSourceMapping, TypeCheckSourceResolver} from './tcb_util';
108108
import {SymbolBuilder} from './template_symbol_builder';
109-
import {ExpressionIdentifier, findAllMatchingNodes, hasExpressionIdentifier} from './comments';
109+
import {findAllMatchingNodes} from './comments';
110110

111111
const REGISTRY = new DomElementSchemaRegistry();
112112
/**

packages/compiler-cli/src/ngtsc/typecheck/src/shim.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
import ts from 'typescript';
1010

11-
import {absoluteFrom, AbsoluteFsPath, getSourceFileOrError} from '../../file_system';
12-
import {PerFileShimGenerator, TopLevelShimGenerator} from '../../shims/api';
11+
import {absoluteFrom, AbsoluteFsPath} from '../../file_system';
12+
import {PerFileShimGenerator} from '../../shims/api';
1313

1414
/**
1515
* A `ShimGenerator` which adds type-checking files to the `ts.Program`.

packages/compiler-cli/src/perform_watch.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import {
1414
exitCodeFromResult,
1515
ParsedConfiguration,
1616
performCompilation,
17-
PerformCompilationResult,
1817
readConfiguration,
1918
} from './perform_compile';
2019
import * as api from './transformers/api';

packages/core/primitives/di/src/injector.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88

99
import {Constructor, InjectionToken} from './injection_token';
10-
import {NotFound, NOT_FOUND} from './not_found';
10+
import {NotFound} from './not_found';
1111

1212
export interface Injector {
1313
retrieve<T>(token: InjectionToken<T>, options?: unknown): T | NotFound;

0 commit comments

Comments
 (0)