If I try to use typedoc with nigthly build or typescript@next, it throw this:
Error: Unknown optionstrictNullChecks.
That would be because it doesn't understand options in the nightly. If someone wants to set up infrastructure for nightly builds, we can mirror TypeScript.
Ok. I also found out that there are other new TS 2 features that isn't supported. And I think there is an bug here because my IO socket got closed again now when I tried to run the typedoc + typescript@next combo
Is there any plan on when the new TS 2 features will be supported?
Why not wait until it's released. Currently its only a beta.
Real need supporting of TS2. My be you can release beta with supporting?
As of June 30, Angular 2 is at RC4 and is already being used in production. Since Angular 2 depends on TypeScript 2.0, companies want to be able to generate source code documentation for their production software. A prerelease version of TypeDoc would be greatly appreciated.
If you want to have tsdoc work with [email protected], try the following
"typedoc": "https://github.com/zakhenry/typedoc/releases/download/v0.4.6/typedoc-0.4.6.tgz",
Note that this is only a hack to make it output properly, it doesn't support any of the new features. I actually have to flag ignoreCompilerErrors: true, for it to run, but the output is correct despite the error output.
Angular 2 depends on TypeScript 2.0??? Where does this come from? I'm working with TypeScript 1.8 and Angular 2 and it works finde and I can't find any reference to TypeScript 2.0
I think there is a lot of migration and bugfixing needed before TypeScript 2.0 can be use in production.
@DaSchTour yea it doesn't yet - angular core is 1.9 currently
@DaSchTour. Angular, itself, has been on the 1.9 nightly since April:
https://github.com/angular/angular/commit/3412aba46e387b234d72e9194e2308f1d71a62df#diff-b9cfc7f2cdf78a7f4b91a753d10865a2R117
angular-cli master branch moved to 2.0 on July 26:
https://github.com/angular/angular-cli/commit/a163186a703ab84926e80bad037422ce619231c9#diff-3a478e3f045d99a9448f81518886a1a1R50
One of the two major seed projects moved past 1.8 on
July 13
https://github.com/AngularClass/angular2-webpack-starter/commit/8a44e2d9419ba73286de155e8f56d39ea801d0d0#diff-b9cfc7f2cdf78a7f4b91a753d10865a2R128
The other is still at 1.8
https://github.com/mgechev/angular2-seed/blob/9a8bf12eef0f28d310ecc0e568f6c5235422749e/package.json#L107
So, yeah, it's time to move.
And as you see not everybody can keep up with that pace. I'm always a friend of moving to the latest technology as fast as possible and I don't think that a seed project and the angular-cli are a good reference. And from my bit of work with typescript 2.0 I'm sure there is a lot of things to solve in the typescript compiler.
And because of the fact that typescript 2.0 has some breaking changes, I guess there are a lot of projects for example gulp-typescript, grunt-typescript and also typedoc that need to consider, that they have to run independent of the typescript version. We can't throw everybody into typescript 2.0.
And because of the fact that typescript 2.0 has some breaking changes...
Sorry, didn't recall the breaking changes:
https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes
readonly propertiesIt's kind of hokey, but you could contemplate targeting different versions of TypeScript:
https://github.com/npm/npm/issues/5499#issuecomment-230673987
...I don't think that a seed project and the angular-cli are a good reference.
angular-cli will be the Angular Team's sanctioned project generator and, therefore, likely to be the basis for many Angular 2 projects that need documentation.
Still, given that angular has clear intentions of deprecating 1.8 support, the breaking changes are minimal enough that it should be trivial to make a package 2.x compatible.
I think for now it would be worth having a tsdoc@next branch that has compatibility with typescript@next. Like @blakeembrey mentioned at the beginning of the thread the infrastructure for nightly builds would be required to achieve this
@zakhenry I'm still getting some errors with your version:
Error: Unknown option `lib.0`.
Error: Unknown option `lib.1`.
Note that i'm using the lib setting in tsconfig.json.
@niieani have you tried the lastest version I'm using?https://github.com/zakhenry/typedoc/releases/download/v0.4.5/typedoc-0.4.5.tgz I realise the semver is a step backward but that's just because I re-deployed from the fork without bumping the version. Saying that I haven't encountered your issue before as I'm not using the lib setting, but this version uses a later version of TS2.0 so it may not occur.
@zakhenry just tried it, but same problem occurs. Thanks for the quick response.
@niieani ok, that's probably because lib is a new feature and tsdoc does some kind of tsconfig.json validation. Probably a relatively easy fix, try forking from https://github.com/zakhenry/typedoc/tree/ts-2.0 as a base to get my fixes
TypeScript 2.0 now has a release candidate.
https://blogs.msdn.microsoft.com/typescript/2016/08/30/announcing-typescript-2-0-rc/
Any update on Typescript 2.0 support?
@bruk1977 There is a PR open (#290) which adds TS 2.0 support. However that PR drops support for 1.8. If you need, you can try installing that branch.
Typescript 2.0 has been released.
https://blogs.msdn.microsoft.com/typescript/2016/09/22/announcing-typescript-2-0
馃憤
+100
Please just add a reaction to the original message instead of posting emoji and numbers. Commenting notifies everyone watching the repo or the thread, which is completely unnecessary if you are just showing your support for the idea.
@WasabiFan Good point. The errors I'm seeing are different from the ones mentioned here:
Error: Unknown option `lib.0`.
Error: Unknown option `lib.1`.
Error: Unknown option `lib.2`.
I get the same with any version mentioned in this thread.
Excuse, TS2 is real need. All our docs was written for typedoc. We updated to angular2 release and TS 2 release and can't get our documentation.
typedoc "--options" "typedoc.json" "--exclude" "**/*.spec.ts" "./src/"
Error: Unknown option `strictNullChecks`.
Error: Unknown option `baseUrl`.
Error: Unknown option `lib.0`.
Error: Unknown option `lib.1`.
Error: Unknown option `types.0`.
Error: Unknown option `types.1`.
Error: Unknown option `types.2`.
Error: Unknown option `types.3`.
Error: Unknown option `types.4`.
Error: Unknown option `types.5`.
Error: Unknown option `types.6`.
Error: Unknown option `types.7`.
Error: Unknown option `types.8`.
Error: Unknown option `types.9`.
@blakeembrey This ticket should be reopened. #290 updates binary references, not adds ts 2 usage support
@jasonswearingen my understanding is that #290 added initial support for compiling with TS 2.0 (thanks to @DatenMetzgerX!). However, more PRs are needed to implement support for TS 2.0 features (see #290 comment). I suggest that these be split into separate issues.
I tried https://github.com/zakhenry/typedoc/releases/download/v0.4.6/typedoc-0.4.6.tgz and it works. I tried https://github.com/TypeStrong/typedoc/archive/v0.5.0.tar.gz (which was the branch that got merged in recently) and it did not work.
Here's my tsconfig.json:
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"noImplicitAny": false,
"removeComments": true,
"preserveConstEnums": true
}
}
You can see there's no new 2.0 flags in there.
Here's the error I'm seeing with the 0.5.0 release:
module.js:341
throw err;
^
Error: Cannot find module '../lib/cli.js'
at Function.Module._resolveFilename (module.js:339:15)
at Function.Module._load (module.js:290:25)
at Module.require (module.js:367:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/landonpoch/source/csl/node_modules/typedoc/bin/typedoc:3:10)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Function.Module.runMain (module.js:447:10)
I agree this should be reopened.
@landonpoch Can you be a little bit more specific... What means not working. Do you get an error message? Are you using any typedoc-plugins?
@DatenMetzgerX Updated previous message to include stack trace. I'm not using any typedoc-plugins.
It sounds like you're using it from GitHub? Did you remember to build the project?
I didn't do anything special to the project after npm install. I just have the url in my package.json. Wasn't aware that pulling if off the URL required a build first. Now that I see 0.5.0 in npm, I tested it with that and it appears to be working.
Thanks for the clarification!
Same here, after upgrading to 0.5 i still get
Error: Unknown option `lib.0`.
Error: Unknown option `lib.1`.
running:typedoc --options typedoc.json --exclude '**/*.spec.ts' ./src/
typedoc.json:
{
"mode": "modules",
"out": "doc",
"theme": "default",
"ignoreCompilerErrors": "true",
"experimentalDecorators": "true",
"emitDecoratorMetadata": "true",
"target": "ES5",
"moduleResolution": "node",
"preserveConstEnums": "true",
"stripInternal": "true",
"suppressExcessPropertyErrors": "true",
"suppressImplicitAnyIndexErrors": "true",
"module": "commonjs"
}
same for me... same error. Any solution on that?
"devDependencies": {
"typedoc": "^0.5.0"
}
If you are getting Error: Unknown option of some sort, it means you have things in tsconfig.json that are TS 2.0 specific and not yet supported in typedoc. lib, and types are examples of this. If you remove these things it should work. I believe they are tracking specific TS 2.0 flags in separate tickets. TS 2.0 should work though as long as you aren't using any of the new TS 2.0 flags that aren't yet supported.
Hi guys,
I've created on-the-fly fork (check here).
This is only a workaround that ignore paths and lib from handle as valid typescript options until typedoc can manage it.
@blakeembrey, during surfing into your code, I've found this: https://github.com/emilianosantucci/typedoc/blob/master/src/lib/utils/options/readers/arguments.ts#L28
It looks like a right approach for ignore _unknown_ options but it seems not be implemented.
It is intentional or I'm wrong?
I'm not really sure, sorry. The code is still 99% the original owners. I'm really only the shepherd of the project with the communities help 馃槃 If you have a fix I'd love to have it merged.
I'd also love a great many things from this project, if someone does want to take it on in https://github.com/TypeStrong/typedoc/issues/256 - it'd be great to make it easier for people to contribute themselves, even right now it's hard for myself to navigate the codebase - it's using some unfamiliar patterns which makes it hard to improve.
Okay, so we need some investigating on :).
I've created official pull request #308 to help people with TypeScrypt 2.0 to build docs without errors, check it.
About #256, I'm replying on it.
@emilianosantucci I installed from you fork
"devDependencies": {
"typedoc": "git+https://github.com/emilianosantucci/typedoc.git"
}
but same problem:
Error: Unknown option `types.0`.
Error: Unknown option `types.1`.
Error: Unknown option `types.2`.
Error: Unknown option `types.3`.
Error: Unknown option `types.4`.
Error: Unknown option `types.5`.
Error: Unknown option `types.6`.
Error: Unknown option `types.7`.
Error: Unknown option `typeRoots.0`.
@daniele-zurico types and typeRoots are not ignored now, I'm going to fixing it right now.
Stay tuned ;)
@daniele-zurico can you retry please?
@emilianosantucci
Using TypeScript 2.0.3 from /Users/danielezurico/Documents/blackswan/explore-workspace/nest-lib-dashboard-charts/node_modules/typedoc/node_modules/typescript/lib
/Users/danielezurico/Documents/blackswan/explore-workspace/nest-lib-dashboard-charts/node_modules/typedoc/lib/converter/types/reference.js:26
return !!(type.flags & 2588672);
^
TypeError: Cannot read property 'flags' of undefined
should be if (type && type.flag)
@daniele-zurico, this seems to be another issue unlinked to my PR.
Maybe your suggestion it's correct but I don't have experience on this slice of business logic, @blakeembrey can help you (probably you need to create another issue or check if already exist).
Most helpful comment
Real need supporting of TS2. My be you can release beta with supporting?