JE42
JE42

Reputation: 5169

How to make typescript optional for ionic 2 applications?

If I need to import a new JS library in an Angular component of an ionic 2 application i first need to install types via typings.

I thought typescript was optional for ionic 2.

How do I need to configure Ionic 2 to skip this additional step?

Upvotes: 1

Views: 79

Answers (1)

sebaferreras
sebaferreras

Reputation: 44669

I'm afraid that a few weeks ago I asked that in ionic-v2 Slack channel and the answer from one developer of Ionic Team was:

We're going all in on TS.

You could do your own work and covert it toa es6 workflow, but we want people to use typescript

So Typescript is not optional for Ionic 2 applications.


UPDATE:

There's also an All in on TypeScript section in Ionic2 resource pages where Ionic Team explains the benefits of using TypeScript:

TypeScript is a superset of JavaScript that gives you advantages like:

  • Optional static typing (the key here is optional)
  • Type Inference, which gives some of the benefits of types, without actually using them
  • Access to ES6 and ES7 features, before they become supported by major browsers
  • The ability to compile down to a version of JavaScript that runs on all browsers
  • Great tooling support with IntelliSense

Because of these awesome features and the huge advantages it gives to you as a developer, Ionic 2 apps are written in TypeScript, instead of ES6.

Upvotes: 2

Related Questions