Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 1 addition & 17 deletions vscode-ng-language-service/server/src/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import {tsDiagnosticToLspDiagnostic} from './diagnostic';
import {ServerHost} from './server_host';
import {
filePathToUri,
isAngularCore,
isConfiguredProject,
isDebugMode,
lspRangeToTsPositions,
Expand Down Expand Up @@ -782,23 +783,6 @@ export class Session {
}
}

function isAngularCore(path: string): boolean {
return isExternalAngularCore(path) || isInternalAngularCore(path);
}

function isExternalAngularCore(path: string): boolean {
return /@angular\/core\/.+\.d\.ts$/.test(path);
}

function isInternalAngularCore(path: string): boolean {
// path in g3
return (
path.endsWith('angular2/rc/packages/core/index.d.ts') ||
// angular/angular repository direct sources
path.includes('angular/packages/core/src')
);
}

function isTypeScriptFile(path: string): boolean {
return path.endsWith('.ts');
}
Expand Down
Loading