-
Notifications
You must be signed in to change notification settings - Fork 709
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
Upgrade to typescript 2.0.3 #290
Conversation
Does this work with both TS 1.8 and 2.0? |
No it's not, as this is not supported by the used architecture of typedoc. Am 14.09.2016 20:21 schrieb "Anthony Ciccarello" notifications@github.com:
|
I would be nice if this could be merged into master or a v1 branch, targeted as the next major release of TypeDoc and released as prerelease so we can use it now with TS2 |
I'm using Path Mapping based Module resolution feature of TypeScript 2.0 and when I'm using it, it's failing on resolving the paths. (see example) Note: I'm referencing the typedoc version which is in PR right now for 2.0.2 support. Any pointers on how to get this path mapping and module resolution to work? Error: Unknown option |
as mentioned... it does not add any typescript 2.0 functionality... |
I just tried doing a similar update myself (but to 2.0.3), but couldn't actually get anything to work. There's an incorrect TypeScript |
TypeScript 2.0 should support compiling projects written in 1.8 correct? My understanding is that the default configuration mainly adds stricter checks like control flow so new errors found in documented projects should be minimal. |
Correct, but there are some incompatibilities. I updated around 30 projects today, around half had errors that weren't caught in 1.8. My issue is ended up being around updating this project though, since there's a custom |
The string replaces task messes up the type script definition file for the |
This PR seems to work for me. I do need to compile the bin/typedoc module to use it, though. Can you update this PR to have the compiled typedoc 'binary' so we can try using it by installing from github? |
@jasongrout I cannot include these files in this PR as they are not intended to be checked in and the consequence is a rejected PR ;) However, I created my own branch that includes the "binaries" as well
|
Thanks! I just realized that it was the lib/ directory that was missing, and that was in |
Hey, took a look at this and it is working for my projects. Has there been any thought on merging this in the past week? |
The string replace grunt task doesn't work quite right, but we fixed it by Jason On Thu, Sep 29, 2016, 10:21 Leland Miller notifications@github.com wrote:
|
@DatenMetzgerX When can we expect a merge 😄 |
I think there are a few questions that need to be answered.
I think we should have a branch for a TS 2.0 compatible version. Then we could iterate on supporting the new features while figuring out how question 1 should be dealt with. |
@mohammedzamakhan @aciccarello Support for new typescript features can be added. It could make sense to open issues for the missing features and hope for contributors... |
Personally, I think:
No, not in the same version. It's not designed to do that (even between 1.x releases).
No, I think a working 2.x should be merged and released as a new version of typedoc.
No, I don't think that should hold things up (obviously if someone does it, that would be great!). |
@@ -31,7 +31,7 @@ export class ModuleConverter extends ConverterNodeComponent<ts.ModuleDeclaration | |||
context.withScope(reflection, () => { | |||
var opt = context.getCompilerOptions(); | |||
if (parent instanceof ProjectReflection && !context.isDeclaration && | |||
(!opt.module || opt.module == ts.ModuleKind.None)) { | |||
(!opt.module || (opt.module as any) === ts.ModuleKind.None)) { |
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.
Please don't cast to any
.
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.
It seems somehow to be needed....
src/lib/converter/nodes/module.ts(34,33): error TS2365: Operator '===' cannot be applied to types 'ModuleKind.CommonJS | ModuleKind.AMD | ModuleKind.UMD | ModuleKind.System | ModuleKind.ES6' and 'ModuleKind.None'.
@@ -179,6 +179,10 @@ export abstract class AbstractComponent<O extends IComponentHost> extends EventD | |||
return this._componentName; | |||
} | |||
|
|||
set componentName(name: string) { | |||
this._componentName = name; | |||
} |
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.
Why not just turn this into a property instead of a getter and setter that does the same thing?
I fixed both of your comments (however, enum comparison is still hacky) and upgraded to 2.0.3 as this is the latest stable release. |
Yayyyyyy!! waiting to use in my project. Let us know when the next version is pushed. Thanks @blakeembrey |
It is |
@blakeembrey um, correct me if I'm wrong, but as per the original push message from @DatenMetzgerX
This doesn't actually address the #234 issue, which is to generate docs for code written in TS2 syntax. |
It should compile 2.0 projects, but I understood that to be that it won't render new features (E.g. that is what constitutes support in In terms of adding the features, it should be easy enough to get in if someone wants to. Doing things like rendering |
I am still getting error in my project
|
Then it looks like there's more work to be done. You can always help out by submitting PRs patching issues you run into 😄 |
Thx... As mentioned... no support for new typescript versions and all these options have been added with typescript 2.0. But you are free to create a pull request that adds support for these new options |
Oh darn, 0.5.0 doesn't work for my project either. Like above, it generates Errors for new typescript 2.0 options in the |
Upgrade typescript to 2.0.2
Does not add any support for any new features. Just referencing new typescript version.
Fixes #234