Skip to content

Commit

Permalink
feat: add TypeScript and its configuration to test-app
Browse files Browse the repository at this point in the history
  • Loading branch information
dannycalleri committed Sep 28, 2023
1 parent a5b0c86 commit 355a2e5
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 0 deletions.
34 changes: 34 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions test-app/config/environment.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export default config;

/**
* Type declarations for import config from 'my-app/config/environment'
*/
declare const config: {
environment: string;
modulePrefix: string;
podModulePrefix: string;
locationType: 'auto' | 'hash' | 'history' | 'none';
rootURL: string;
APP: Record<string, unknown>;
};
4 changes: 4 additions & 0 deletions test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
"@embroider/test-setup": "3.0.1",
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.1.2",
"@tsconfig/ember": "^3.0.1",
"@types/qunit": "^2.19.6",
"@typescript-eslint/eslint-plugin": "^6.5.0",
"@typescript-eslint/parser": "^6.5.0",
"broccoli-asset-rev": "3.0.0",
Expand All @@ -44,6 +46,7 @@
"ember-cli-inject-live-reload": "2.1.0",
"ember-cli-sri": "2.1.1",
"ember-cli-terser": "4.0.2",
"ember-cli-typescript": "^5.2.1",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-fetch": "8.1.2",
"ember-load-initializers": "2.1.2",
Expand All @@ -69,6 +72,7 @@
"qunit": "2.19.4",
"qunit-dom": "2.0.0",
"release-it": "15.11.0",
"typescript": "^5.2.2",
"webpack": "5.88.2"
},
"engines": {
Expand Down
17 changes: 17 additions & 0 deletions test-app/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"extends": "@tsconfig/ember/tsconfig.json",
"compilerOptions": {
// The combination of `baseUrl` with `paths` allows Ember's classic package
// layout, which is not resolvable with the Node resolution algorithm, to
// work with TypeScript.
"baseUrl": ".",
// Type check only the code specifically refered to in the source code.
"skipLibCheck": true,
"paths": {
"test-app/tests/*": ["tests/*"],
"test-app/*": ["app/*"],
"*": ["types/*"]
}
},
"include": ["app/**/*", "tests/**/*", "types/**/*"]
}
2 changes: 2 additions & 0 deletions test-app/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import 'ember-source/types';
import 'ember-source/types/preview';

0 comments on commit 355a2e5

Please sign in to comment.