-
-
Notifications
You must be signed in to change notification settings - Fork 737
remove exclusion of TS 2 options, add lib support #449
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
Conversation
src/lib/utils/options/declaration.ts
Outdated
|
||
if (map instanceof Map && map.has(key)) { | ||
value = map.get(key); | ||
} else if (key in map) { | ||
value = map[key]; | ||
} else if (errorCallback) { | ||
} else if (!~values.indexOf(value) && errorCallback) { |
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.
Can we use the non-clever format of indexOf
, cheers! 😄
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.
Removed! Sorry about that!
src/lib/utils/options/options.ts
Outdated
this.setValues(value, prefix + key + '.', errorCallback); | ||
} else { | ||
this.setValue(prefix + key, value, errorCallback); | ||
this.setValue(prefix + key, value); |
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.
Was there a reason behind this signature change?
@@ -51,31 +51,30 @@ export class TSConfigReader extends OptionsComponent { | |||
return; | |||
} | |||
|
|||
let data = ts.readConfigFile(fileName, ts.sys.readFile).config; | |||
if (data === undefined) { | |||
let { config } = ts.readConfigFile(fileName, ts.sys.readFile); |
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.
Could we use const
if there's no other mutation?
Sorry for the delay, I just had a couple of last comments. Once those are reviewed, I'm happy to merge! |
* Remove restriction on what compilerOptions can be set * remove filtering of TS 2.2 compilerOptions * add support for 'list' option types * Switch to processed compilerOptions * add support for `compilerOptions.lib` This PR removes the restrictions on setting options that aren't explicitly setup as options to allow new compilerOptions to pass through TypeDoc to TypeScript. It also sets up support for 'list' parameter types, and switches to use the processed compilerOptions, rather than `raw` so that the `lib` properties are properly parsed. This should fix TypeStrong#315 and I believe TypeStrong#311.
@blakeembrey Thanks! I rebased off the latest master and pushed up two commits to address your comments. Regarding the signature change, I actually modified my approach now that Also, I checked in a number of changes to the built files (in a separate commit). These changes aren't related to this work, and appear when running the tests, even on master. I can remove this commit if you like. |
Thanks @nicknisi! ❤️ I'm going to make a minor edit since it looks like you accidentally inserted a tab where there's spaces, then I'll merge 👍 |
Weird. I just pulled this in and tested, but I end up reverting all the |
Yep, you're totally right... I didn't realize I had the themes repo |
compilerOptions.lib
This PR removes the restrictions on setting options that aren't explicitly setup as options to allow new compilerOptions to pass through TypeDoc to TypeScript. It also sets up support for 'list' parameter types, and switches to use the processed compilerOptions, rather than
raw
so that thelib
properties are properly parsed.This should fix #315 and I believe #311.