Skip to content

[Release-2.1] Fix declaration emit when using type parameters #11931

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

yuit
Copy link
Contributor

@yuit yuit commented Oct 28, 2016

Fix #11855

@yuit yuit added this to the TypeScript 2.1 milestone Oct 28, 2016
foo<U, J>(): Foo<U, J>;
};
declare type SubFoo<R, S> = Foo<S, R>;
declare function foo(): Foo<number, string>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this does not look right. this should be Foo<string, number>

@@ -2180,54 +2180,105 @@ namespace ts {
writer.writeKeyword(!(globalFlags & TypeFormatFlags.WriteOwnNameForAnyLike) && isTypeAny(type)
? "any"
: (<IntrinsicType>type).intrinsicName);
return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you keep the else if for this change. it makes it easier to understand the extent of the change here.

@yuit yuit merged commit ad9c148 into release-2.1 Oct 31, 2016
@yuit yuit deleted the release-2.1_fixDeclarationEmitTypeAlaisWithTypeParam branch October 31, 2016 20:18
@mhegazy
Copy link
Contributor

mhegazy commented Oct 31, 2016

@yuit can you please port this to master as well.

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants