Typedoc: Upgrade to TypeScript 3.x

Created on 29 Mar 2018  路  10Comments  路  Source: TypeStrong/typedoc

When using new features of TypeScript 2.8 such as this one: https://github.com/Microsoft/TypeScript/wiki/What's-new-in-TypeScript#improved-control-over-mapped-type-modifiers

TypeDoc cannot process TypeScript files that use those features.

Update May 31, 2018: TypeScript 2.9 is out now.

Update July 30, 2018: TypeScript 3.0 is out now. https://blogs.msdn.microsoft.com/typescript/2018/07/30/announcing-typescript-3-0/

Most helpful comment

Typescript 3.0 is out now.

Also, related issue: https://github.com/TypeStrong/typedoc/issues/822

All 10 comments

Already tested manually to add the newest version of typescript in the typedoc itself and it worked just fine

$ typedoc ./src --out ./doc --module commonjs --target ES5 --hideGenerator --mode file --readme none --theme minimal --excludePrivate

Using TypeScript 2.8.1 from /home/myuser/Documents/mylib/node_modules/typedoc/node_modules/typescript/lib
Rendering [========================================] 100%

Documentation generated at /home/myuser/Documents/mylib/doc

Done in 4.60s.

I have tried to use homomorphic mapped types but got this error:

interface IOptions {
  a?: string;
  b?: number;
}

type TNonOptionalOptions = {[P in keyof IOptions]-?: IOptions[P]};

Error: file.ts(6) ';' expected. Error: file.ts(6) Expression expected. Error: file.ts(6) Expression expected. Error: file.ts(6) Declaration or statement expected.

I have also tried Required<T> type from lib.d.ts but got this:

Cannot find name 'Required'

@alisahinozcelik did you get that error when running the current typedoc or the version in this PR?

@aciccarello I have got the error at [email protected] and [email protected]

common guys, please upgrade the TS version.

Following fails :(

type DeepPartial<T> = {
  [key in keyof T]?: T[key] extends Object ? DeepPartial<T[key]> : T[key]
};

FYI TypeScript 2.9 is out soon

See also #744.

Typescript 3.0 is out now.

Also, related issue: https://github.com/TypeStrong/typedoc/issues/822

824 provides the updates to make TypeDoc work with TypeScript 3.1.x.

Was this page helpful?
0 / 5 - 0 ratings