Skip to content

Commit

Permalink
EMBER: added ember-cli-typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
toranb committed Jun 8, 2018
1 parent 746c59d commit 120838d
Show file tree
Hide file tree
Showing 5 changed files with 335 additions and 9 deletions.
16 changes: 16 additions & 0 deletions app/config/environment.d.ts
@@ -0,0 +1,16 @@
export default config;

/**
* Type declarations for
* import config from './config/environment'
*
* For now these need to be managed by the developer
* since different ember addons can materialize new entries.
*/
declare const config: {
environment: any;
modulePrefix: string;
podModulePrefix: string;
locationType: string;
rootURL: string;
};
10 changes: 9 additions & 1 deletion package.json
Expand Up @@ -17,6 +17,12 @@
"test": "ember test"
},
"devDependencies": {
"@types/ember": "^2.8.25",
"@types/ember-qunit": "^3.0.2",
"@types/ember-test-helpers": "^0.7.1",
"@types/ember-testing-helpers": "^0.0.3",
"@types/qunit": "^2.5.1",
"@types/rsvp": "^4.0.1",
"broccoli-asset-rev": "^2.7.0",
"ember-angle-bracket-invocation-polyfill": "^1.1.4",
"ember-cli": "~3.2.0-beta.2",
Expand All @@ -31,6 +37,7 @@
"ember-cli-qunit": "^4.1.1",
"ember-cli-shims": "^1.2.0",
"ember-cli-sri": "^2.1.0",
"ember-cli-typescript": "^1.3.2",
"ember-cli-uglify": "^2.0.0",
"ember-export-application-global": "^2.0.0",
"ember-load-initializers": "^1.1.0",
Expand All @@ -40,7 +47,8 @@
"ember-welcome-page": "^3.0.0",
"eslint-plugin-ember": "^5.0.0",
"loader.js": "^4.2.3",
"qunit-dom": "^0.6.2"
"qunit-dom": "^0.6.2",
"typescript": "^2.9.1"
},
"engines": {
"node": "^4.5 || 6.* || >= 7.*"
Expand Down
34 changes: 34 additions & 0 deletions tsconfig.json
@@ -0,0 +1,34 @@
{
"compilerOptions": {
"target": "es2017",
"allowJs": true,
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"noImplicitAny": true,
"noImplicitThis": true,
"alwaysStrict": true,
"strictNullChecks": true,
"strictPropertyInitialization": true,
"noFallthroughCasesInSwitch": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noEmitOnError": false,
"noEmit": true,
"inlineSourceMap": true,
"inlineSources": true,
"baseUrl": ".",
"module": "es6",
"paths": {
"guides/*": [
"app/*"
],
"*": [
"types/*"
]
}
},
"include": [
"app"
]
}
10 changes: 10 additions & 0 deletions types/guides/index.d.ts
@@ -0,0 +1,10 @@

import Ember from 'ember';

declare global {
interface Array<T> extends Ember.ArrayPrototypeExtensions<T> {}
// interface Function extends Ember.FunctionPrototypeExtensions {}
}

export {};

0 comments on commit 120838d

Please sign in to comment.