Skip to content

Commit

Permalink
Set use flag (#24881) (#24887)
Browse files Browse the repository at this point in the history
  • Loading branch information
weswigham authored Jun 12, 2018
1 parent 271fb83 commit 8b3fe2d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/signatureHelp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ namespace ts.SignatureHelp {
return children[indexOfOpenerToken + 1];
}

const signatureHelpNodeBuilderFlags = NodeBuilderFlags.OmitParameterModifiers | NodeBuilderFlags.IgnoreErrors;
const signatureHelpNodeBuilderFlags = NodeBuilderFlags.OmitParameterModifiers | NodeBuilderFlags.IgnoreErrors | NodeBuilderFlags.UseAliasDefinedOutsideCurrentScope;
function createSignatureHelpItems(candidates: Signature[], resolvedSignature: Signature, argumentListInfo: ArgumentListInfo, typeChecker: TypeChecker): SignatureHelpItems {
const { argumentCount, argumentsSpan: applicableSpan, invocation, argumentIndex } = argumentListInfo;
const isTypeParameterList = argumentListInfo.kind === ArgumentListKind.TypeArguments;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/// <reference path="fourslash.ts" />

// @Filename: exporter.ts
////export interface Thing {}
////export const Foo: () => Thing = null as any;

// @Filename: usage.ts
////import {Foo} from "./exporter"
////function f(p = Foo()): void {}
////f(/*1*/

verify.signatureHelp({
marker: "1",
text: "f(p?: Thing): void"
});

0 comments on commit 8b3fe2d

Please sign in to comment.