Skip to content

emit _classCallCheck #6569

Closed
Closed
@basarat

Description

@basarat

For the follwing:

class Foo{ 
}

Babel emits:

"use strict";

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Foo = function Foo() {
  _classCallCheck(this, Foo);
};

Not really needed for TypeScript. But a request for a similar emit was made for TypeScript : http://stackoverflow.com/q/34945858/390330

Purely for tracking 🌹

Metadata

Metadata

Assignees

No one assigned

    Labels

    RevisitAn issue worth coming back toSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions