mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-10 01:43:59 -05:00
Fixed errors with overloaded method exports
This commit is contained in:
@@ -17893,7 +17893,8 @@ namespace ts {
|
||||
}
|
||||
|
||||
function isNotOverload(declaration: Declaration): boolean {
|
||||
return declaration.kind !== SyntaxKind.FunctionDeclaration || !!(declaration as FunctionDeclaration).body;
|
||||
return (declaration.kind !== SyntaxKind.FunctionDeclaration && declaration.kind !== SyntaxKind.MethodDeclaration) ||
|
||||
!!(declaration as FunctionDeclaration).body;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
20
tests/cases/fourslash/completionListInImportClause04.ts
Normal file
20
tests/cases/fourslash/completionListInImportClause04.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
// @Filename: foo.d.ts
|
||||
//// declare class Foo {
|
||||
//// static prop1(x: number): number;
|
||||
//// static prop1(x: string): string;
|
||||
//// static prop2(x: boolean): boolean;
|
||||
//// }
|
||||
//// export = Foo; /*2*/
|
||||
|
||||
// @Filename: app.ts
|
||||
////import {/*1*/} from './foo';
|
||||
|
||||
goTo.marker('1');
|
||||
verify.completionListContains('prop1');
|
||||
verify.completionListContains('prop2');
|
||||
verify.not.completionListContains('Foo');
|
||||
verify.numberOfErrorsInCurrentFile(0);
|
||||
goTo.marker('2');
|
||||
verify.numberOfErrorsInCurrentFile(0);
|
||||
Reference in New Issue
Block a user