Skip to content

Commit

Permalink
refactor(compiler): Rename PipeInScope -> PotentialPipe (#47561)
Browse files Browse the repository at this point in the history
Now that `getPotentialTemplateDirectives` uses `PotentialDirective`, we should rename `PipeInScope` to match.

PR Close #47561
  • Loading branch information
dylhunn authored and AndrewKushnir committed Oct 4, 2022
1 parent 79c016d commit 2919463
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/compiler-cli/src/ngtsc/typecheck/api/checker.ts
Expand Up @@ -14,7 +14,7 @@ import {ErrorCode} from '../../diagnostics';

import {FullTemplateMapping, NgTemplateDiagnostic, TypeCheckableDirectiveMeta} from './api';
import {GlobalCompletion} from './completion';
import {PipeInScope, PotentialDirective} from './scope';
import {PotentialDirective, PotentialPipe} from './scope';
import {ElementSymbol, Symbol, TcbLocation, TemplateSymbol} from './symbols';

/**
Expand Down Expand Up @@ -137,7 +137,7 @@ export interface TemplateTypeChecker {
/**
* Get basic metadata on the pipes which are in scope for the given component.
*/
getPipesInScope(component: ts.ClassDeclaration): PipeInScope[]|null;
getPipesInScope(component: ts.ClassDeclaration): PotentialPipe[]|null;

/**
* Retrieve a `Map` of potential template element tags, to either the `PotentialDirective` that
Expand Down
6 changes: 3 additions & 3 deletions packages/compiler-cli/src/ngtsc/typecheck/api/scope.ts
Expand Up @@ -13,7 +13,7 @@ import {ClassDeclaration} from '../../reflection';
import {SymbolWithValueDeclaration} from '../../util/src/typescript';

/**
* Metadata on a directive which is available in the scope of a template.
* Metadata on a directive which is available in a template.
*/
export interface PotentialDirective {
ref: Reference<ClassDeclaration>;
Expand Down Expand Up @@ -50,9 +50,9 @@ export interface PotentialDirective {
}

/**
* Metadata for a pipe which is available in the scope of a template.
* Metadata for a pipe which is available in a template.
*/
export interface PipeInScope {
export interface PotentialPipe {
/**
* The `ts.Symbol` for the pipe class.
*/
Expand Down
6 changes: 3 additions & 3 deletions packages/compiler-cli/src/ngtsc/typecheck/src/checker.ts
Expand Up @@ -20,7 +20,7 @@ import {ClassDeclaration, DeclarationNode, isNamedClassDeclaration, ReflectionHo
import {ComponentScopeKind, ComponentScopeReader, TypeCheckScopeRegistry} from '../../scope';
import {isShim} from '../../shims';
import {getSourceFileOrNull, isSymbolWithValueDeclaration} from '../../util/src/typescript';
import {ElementSymbol, FullTemplateMapping, GlobalCompletion, NgTemplateDiagnostic, OptimizeFor, PipeInScope, PotentialDirective, ProgramTypeCheckAdapter, Symbol, TcbLocation, TemplateDiagnostic, TemplateId, TemplateSymbol, TemplateTypeChecker, TypeCheckableDirectiveMeta, TypeCheckingConfig} from '../api';
import {ElementSymbol, FullTemplateMapping, GlobalCompletion, NgTemplateDiagnostic, OptimizeFor, PotentialDirective, PotentialPipe, ProgramTypeCheckAdapter, Symbol, TcbLocation, TemplateDiagnostic, TemplateId, TemplateSymbol, TemplateTypeChecker, TypeCheckableDirectiveMeta, TypeCheckingConfig} from '../api';
import {makeTemplateDiagnostic} from '../diagnostics';

import {CompletionEngine} from './completion';
Expand Down Expand Up @@ -572,7 +572,7 @@ export class TemplateTypeCheckerImpl implements TemplateTypeChecker {
return Array.from(resultingDirectives.values());
}

getPipesInScope(component: ts.ClassDeclaration): PipeInScope[]|null {
getPipesInScope(component: ts.ClassDeclaration): PotentialPipe[]|null {
const data = this.getScopeData(component);
if (data === null) {
return null;
Expand Down Expand Up @@ -910,6 +910,6 @@ class SingleShimTypeCheckingHost extends SingleFileTypeCheckingHost {
*/
interface ScopeData {
directives: PotentialDirective[];
pipes: PipeInScope[];
pipes: PotentialPipe[];
isPoisoned: boolean;
}

0 comments on commit 2919463

Please sign in to comment.