Skip to content

core-js and TypeScript - how do these fit together? #3956

Closed
@johnnyreilly

Description

@johnnyreilly

The recent blogpost on the TypeScript 1.5 release highlighted the contrast between Babel and TypeScript in terms of ES6 compatibility.

However both are listed as Babel + core-js and TypeScript + core-js:

image

I understand that Babel ships with core-js but I'm a little confused as to what TypeScript + core-js actually means. Since TypeScript ships some of its own polyfills and core-js is entirely polyfills (as I understand) I'm puzzled as to what TypeScript + core-js actually is?

Is there a compilation flag that prevents TSC from generating super and the like so that core-js can be dropped in instead? Or is there an advised way of combining TypeScript and core-js that I haven't stumbled upon yet?

Apologies for raising it as an issue as it's more a question. I've looked on StackOverflow and found this related question:

http://stackoverflow.com/questions/31417833/using-core-js-with-typescript

However it didn't resolve my mystery. All guidance appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocsThe issue relates to how you learn TypeScriptQuestionAn issue which isn't directly actionable in code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions