-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Typescript Support! #5647
WIP: Typescript Support! #5647
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es2017", | ||
"allowJs": true, | ||
"moduleResolution": "node", | ||
"allowSyntheticDefaultImports": true, | ||
"noImplicitAny": true, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I always approach a large TS conversion by going through the following process:
Starting out with strict TS config will result in a lot of thrash, as new type-checking issues surface in waves (i.e., a commit that improves types in file B reveals type-checking failures in file A -- over and over and over) |
||
"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": { | ||
"dummy/tests/*": [ | ||
"tests/*" | ||
], | ||
"dummy/*": [ | ||
"tests/dummy/app/*", | ||
"app/*" | ||
], | ||
"ember-data": [ | ||
"addon" | ||
], | ||
"ember-data/*": [ | ||
"addon/*" | ||
], | ||
"ember-data/test-support": [ | ||
"addon-test-support" | ||
], | ||
"ember-data/test-support/*": [ | ||
"addon-test-support/*" | ||
], | ||
"*": [ | ||
"types/*" | ||
] | ||
} | ||
}, | ||
"include": [ | ||
"app/**/*", | ||
"addon/**/*", | ||
"tests/**/*", | ||
"types/**/*", | ||
"test-support/**/*", | ||
"addon-test-support/**/*" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this file supposed to be empty? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's added by default, yeah |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are
null
,undefined
and non-serializable objects (i.e., circular references) valid things to pass here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unsure, I started this file as the first TS file just to see if I could get a build/tests going.
One of the things I'm excited about with the TS conversion, is that anybody will be able to answer that question :)