-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug
Description
TypeScript Version: First noticed on 2.9.1, confirmed in 3.0.0-dev.20180712
Search Terms:
generator abstract, "An overload signature cannot be declared as a generator.", generator overload, overload generator abstract, TS1222
Code
abstract class SomethingAbstract {
// TS1222: An overload signature cannot be declared as a generator.
abstract *sadGenerator(): any; // specifying a return type doesn't help
*fineGenerator(): any {}
}
Expected behavior:
The compiler should allow abstract generator methods.
Actual behavior:
The compiler does not allow abstract generator methods: instead, it errors with: [ts] An overload signature cannot be declared as a generator.
I believe I know where and why this is and I'll open up a PR once I fix it.
Playground Link: Small sample
Related Issues:
Couldn't find any related ones
DanielRosenwasser, MohamedLamineAllal and rgrannell1DanielRosenwasser
Metadata
Metadata
Assignees
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug