I want to try ts inside my ember project ( I try it before on small applications )
So i have
"ember-cli-typify": "^0.3.1",
"typescript": "^2.0.3"
"typings": "^1.4.0"
"ember-cli": "2.4.3"
Inside my tsconfig.json
{
"compilerOptions": {
"target": "ES6",
"allowJs": true,
"moduleResolution": "node",
"noEmitOnError": true,
"noEmit": true,
"baseUrl": ".",
"paths": {
"ember": ["node_modules/at-types-ember"],
"npm:*": ["local-types/*"],
"*": ["local-types/*"]
}
},
"include": [
"app/**/*"
],
"files": [
"typings/index.d.ts"
]
}
I try to move app/app.js
into app/app.ts
inside file I have next
import Ember from 'ember'; // this was solved via typings dt~ember
import Resolver from './resolver.js'; // here I just add `.js` but I'm interested how to avoid it
import loadInitializers from 'ember-load-initializers'; // here I have first error
import config from './config/environment';
inside typings/index.d.ts
I add line
declare module 'ember-load-initializers' { var out: any; export = out; }
But I still got
.../tree_stabilizer-output_path-http://ift.tt/2cXB4Ut (6, 30): Cannot find module 'ember-load-initializers'.
I try put declaration into separate file and add it into files
section, but got the same result
P.S. I try to use tildeio/broccoli-typescript-compiler
but It doesn't work for me ( or I do something wrong ) - but if you have some instruction for it ( in couple with ember-cli ) -- it will be great if you share
Aucun commentaire:
Enregistrer un commentaire