TypeScript library referenced is three years old
Closed this issue · 8 comments
scripts/config-typescript.js currently points to a version of TypeScript from 2016:
https://cdnjs.cloudflare.com/ajax/libs/typescript/1.9.0/typescript.min.js
Could this be updated? As of the time I'm writing this, the most current version is 3.4.2:
https://cdnjs.cloudflare.com/ajax/libs/typescript/3.4.2/typescript.min.js
Ping @bigopon
@davidlav we definitely can upgrade it, the only reason that it's that old is because we are no longer using it in this repo. It's not even a main dependency as you can see in the package.json 😓
I was following the instructions for the To-do app quick start in the docs to learn how to use the script-tag only system, and noticed that the TypeScript library used was way out of date (as well as much of what's in that zip file I believe), and that brought me here.
Is there a better/more up-to-date way to use TypeScript in a script-tag build now? Or does the basic process outlined in that tutorial still stand? (old versions of Aurelia and TypeScript in the zip file notwithstanding)
@davidlav For script tag, you only need to add a script tag and go, as you can see from this example https://codesandbox.io/s/wnr6zxv6vl
There is no need for JSPM. And most of the tutorial can be applied with little to no change between JSPM and script tag I believe
Here is an example with routing https://codesandbox.io/s/rlxzkpjpno
@bigopon Thanks for the reply and the link, but I was specifically interested in using TypeScript with aurelia-script (as shown in the Todo example in the docs). But the code sandbox link doesn't seem to support that.
If I want to use TypeScript with aurelia-script, is that possible? Or do I need to use the older method outlined in the Todo example from three years ago?
@davidlav For typescript, probably there needs to be a special typings file to accommodate all the typings to go with it. At the moment, it's not easy to use. Aurelia-script is meant to be used in a more JavaScript way: add a script tag to the page and go.
Gotcha, that answers my question. Thanks!
@EisenbergEffect @davidlav I think this can be closed. Typescript support for esm dist can be worked on sometimes later, but probably not now