cmichaelgraham / aurelia-typescript

A starter kit for working with the Aurelia TypeScript type definitions
MIT License
144 stars 52 forks source link

aurelia.d.ts for aurelia with decorators #18

Closed mvbaffa closed 9 years ago

mvbaffa commented 9 years ago

Hi,

I am trying to compile the get started example with WebStorm and TypeScript 1.5.

I am using the old d.ts and I had to change three imports, one of them is: import Logging = require('aurelia-logging') changed to import * as Logging from 'aurelia-logging';

The syntax errors have gone but when I try to compile the app.js:

//

import {inject} from 'aurelia-framework'; import {Router} from 'aurelia-router'; import 'bootstrap'; import 'bootstrap/css/bootstrap.css!';

@inject(Router) export class App { constructor(private router) { this.router = router; this.router.configure(config => { config.title = 'Aurelia'; config.map([ { route: ['','welcome'], moduleId: './welcome', nav: true, title:'Welcome' } ]); }); } }

I receive the error: Error:(3, 9) TS2305: Module '"aurelia-framework"' has no exported member 'inject'.

When there will be an aurelia.d.ts for the new version aurelia with ES7 decorators.

Thanks

cmichaelgraham commented 9 years ago

once vs 2013 supports ts 1.5 i will update all the samples in aurelia typescript repo.

for now, take a look at aurelia-gulp-skelly-ts-1-5 repo.

it has aurelia.d.ts with decorators

let me know if you need more help :)

mvbaffa commented 9 years ago

Hi,

I have downloaded the repo but the import is still "import Logging = require('aurelia-logging')". I will change the import lines once more and see what happens

Thanks

iicaisin1 commented 9 years ago

change it to import {inject} from 'aurelia-framework'; import {Router} from 'aurelia-router';

also, to get the latest typescript support in vs 2015 you might have to clone the typescript library and run the following command in powershell Scripts\VSDevMode.ps1 -enableDevMode -vsVersion 14 -tsScript Bin

cmichaelgraham commented 9 years ago

@mvbaffa let me if it works or if you still have troubles

@iicaisin1 do you know when we can expect a proper ts 1.5 install for vs 2013?

mvbaffa commented 9 years ago

Yes. I did changed the imports once and it worked. As soon as I can access my development machine I will do it.

By the way I am working in this project with WebStorm 10. I have already installed TypeScript 1.5 and it is working ok.

Thanks

cmichaelgraham commented 9 years ago

thanks !! that's good to know about webstorm.

iicaisin1 commented 9 years ago

@mvbaffa following their threads, I don't think they have an intention to release a proper installer anytime soon for either visual studio version. it probably will happen just before the release date. Until then, you would have to use the development setup i mentioned earlier, just change the vs version to 12

mvbaffa commented 9 years ago

I will soon return to Aurelia. As soon as I finish my preliminar backend.

Thanks Em 18/04/2015 18:16, "iicaisin1" notifications@github.com escreveu:

@mvbaffa https://github.com/mvbaffa following their threads, I don't think they have an intention to release a proper installer anytime soon for either visual studio version. it probably will happen just before the release date. Until then, you would have to use the development setup i mentioned earlier, just change the vs version to 12

— Reply to this email directly or view it on GitHub https://github.com/cmichaelgraham/aurelia-typescript/issues/18#issuecomment-94201430 .

cmichaelgraham commented 9 years ago

roger that :+1:

cmichaelgraham commented 9 years ago

closing issue, please open a new one for any remaining issues - thanks :+1: