Skip to content

Issue error when tagging templates and decorating with only-constructable entities#10506

Merged
DanielRosenwasser merged 8 commits into
masterfrom
ctorTag
Aug 29, 2016
Merged

Issue error when tagging templates and decorating with only-constructable entities#10506
DanielRosenwasser merged 8 commits into
masterfrom
ctorTag

Conversation

@DanielRosenwasser
Copy link
Copy Markdown
Member

Fixes #10454.

@yuit @rbuckton can you review?

@DanielRosenwasser DanielRosenwasser changed the title Issue error when tagging templates and decorating with constructable entities Issue error when tagging templates and decorating with only-constructable entities Aug 23, 2016
@yuit
Copy link
Copy Markdown
Contributor

yuit commented Aug 25, 2016

I don't get why it has to have both call signature and constructor signatures. Would having just call signatures not enough?

Comment thread src/compiler/checker.ts
// but is a subtype of the Function interface, the call is an untyped function call. In an
// untyped function call no TypeArgs are permitted, Args can be any argument list, no contextual

// TS 1.0 Spec: 4.12
Copy link
Copy Markdown
Contributor

@yuit yuit Aug 25, 2016

Choose a reason for hiding this comment

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

Also you may want to update spec section. it is 4.15

@DanielRosenwasser
Copy link
Copy Markdown
Member Author

@yuit I guess the idea was always that if you have any call/construct signatures, you probably should have an appropriate signature for the call. Otherwise, if all you know is that something's a Function, any is the best you can do.

@mhegazy
Copy link
Copy Markdown
Contributor

mhegazy commented Aug 29, 2016

👍

@DanielRosenwasser DanielRosenwasser merged commit 0485bb6 into master Aug 29, 2016
@DanielRosenwasser DanielRosenwasser deleted the ctorTag branch August 29, 2016 05:42
@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.

5 participants