mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Just check all declarations, don't call isUncalledFunction
This commit is contained in:
@@ -35323,7 +35323,7 @@ namespace ts {
|
||||
error(node, Diagnostics.Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type);
|
||||
}
|
||||
|
||||
if (isImportSpecifier(node) && isUncalledFunctionReference(target.valueDeclaration, target)) {
|
||||
if (isImportSpecifier(node) && every(target.declarations, d => !!(getCombinedNodeFlags(d) & NodeFlags.Deprecated))) {
|
||||
errorOrSuggestion(/* isError */ false, node.name, Diagnostics._0_is_deprecated, symbol.escapedName as string);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
///<reference path="fourslash.ts" />
|
||||
|
||||
// @Filename: first.ts
|
||||
//// export class logger { }
|
||||
// @Filename: second.ts
|
||||
//// import { logger } from './first';
|
||||
//// new logger()
|
||||
|
||||
goTo.file('second.ts')
|
||||
verify.noErrors()
|
||||
verify.getSuggestionDiagnostics([]);
|
||||
Reference in New Issue
Block a user