Skip to content

Commit e2eb319

Browse files
committed
Just check all declarations, don't call isUncalledFunction
1 parent 6e5d75b commit e2eb319

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35323,7 +35323,7 @@ namespace ts {
3532335323
error(node, Diagnostics.Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type);
3532435324
}
3532535325

35326-
if (isImportSpecifier(node) && isUncalledFunctionReference(target.valueDeclaration, target)) {
35326+
if (isImportSpecifier(node) && every(target.declarations, d => !!(getCombinedNodeFlags(d) & NodeFlags.Deprecated))) {
3532735327
errorOrSuggestion(/* isError */ false, node.name, Diagnostics._0_is_deprecated, symbol.escapedName as string);
3532835328
}
3532935329
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
///<reference path="fourslash.ts" />
2+
3+
// @Filename: first.ts
4+
//// export class logger { }
5+
// @Filename: second.ts
6+
//// import { logger } from './first';
7+
//// new logger()
8+
9+
goTo.file('second.ts')
10+
verify.noErrors()
11+
verify.getSuggestionDiagnostics([]);

0 commit comments

Comments
 (0)