
Description
Hi,
First of all, thanks for typedoc, its great.
Previously I have forgot to mention I am using just --json output, but it probably can't affect questions I have asked bellow.
I would like to ask if the typedoc supports the --lib (or "lib" option in the tsconfig). --lib is not supported directly (there is no way how to pass it to typedoc) and "lib" seems not to be working as tsc reports errors. I am currently using TypeScript 2.5.1 (from typedoc perspective it should be the same as 2.4) with es2015.promise lib and it seems the typedoc is not able to pass the tsconfig correctly to the compiler as it emits number of errors: "Cannot find promise". Compilation itself works well.
Using TypeScript 2.1.4 from C:\Program Files\NodeJS\node_modules\typedoc\node_modules\typescript\lib
Error: Cannot find global type 'Promise'.
...
An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option.
Also the tsconfig option "extends" which basically merges two tsconfigs together fails within the typedoc (when I merge everything manually to typedoc.json and pass it as --tsconfig option it works well - except the lib errors ;) ):
TypeError: Cannot convert undefined or null to object
at TSConfigReader.load (C:\Program Files\NodeJS\node_modules\typedoc\dist\lib\utils\options\readers\tsconfig.js:60:36)
at TSConfigReader.onDiscover (C:\Program Files\NodeJS\node_modules\typedoc\dist\lib\utils\options\readers\tsconfig.js:31:18)
at C:\Program Files\NodeJS\node_modules\typedoc\dist\lib\utils\events.js:256:33
at triggerApi (C:\Program Files\NodeJS\node_modules\typedoc\dist\lib\utils\events.js:106:13)
at Options.EventDispatcher.trigger (C:\Program Files\NodeJS\node_modules\typedoc\dist\lib\utils\events.js:250:13)
at Options.read (C:\Program Files\NodeJS\node_modules\typedoc\dist\lib\utils\options\options.js:73:14)
at CliApplication.Application.bootstrap (C:\Program Files\NodeJS\node_modules\typedoc\dist\lib\application.js:37:22)
at CliApplication.bootstrap (C:\Program Files\NodeJS\node_modules\typedoc\dist\lib\cli.js:32:49)
at CliApplication.Application [as constructor] (C:\Program Files\NodeJS\node_modules\typedoc\dist\lib\application.js:33:15)
at new CliApplication (C:\Program Files\NodeJS\node_modules\typedoc\dist\lib\cli.js:29:23)
I am merging these files:
tsconfig.common.json:
{
// TypeScript 2.1 compiler configuration
// COMMON CONFIGURATION (DEBUG/RELEASE)
"compileOnSave": true,
"compilerOptions": {
// output file (single js file will be generated)
"outFile": "../../js/ajs.js",
// target ECMA version
"target": "es5",
// libs to be used during compilation
"lib": [ "dom", "es2015.promise", "es5" ],
// moule system to be used (none, AMD, CommonJS, UMD, System, ES2015)
"module": "none",
// don't emit any output when compilation fails
"noEmitOnError": true,
// don't emit BOM
"emitBOM": false,
// preserve const enums (don't delete from generated code)
"preserveConstEnums": true,
// implicit any
"noImplicitAny": false,
// TSX/JSX compilation support
"jsx": "react",
// ajs.debug.tsx is the React.js replacement but for Ajs debugging purposes only
"reactNamespace": "AjsDebugTsxFactory"
},
"include": [
"./src/**/*"
]
}
tsconfig.Debug.json
{
// TypeScript 2.1 compiler configuration
// DEBUG CONFIGURATION
"extends": "./tsconfig.common.json",
"compilerOptions": {
// generate .d.ts declaration file
"declaration": true,
// generate source maps
"sourceMap": true,
// remove comments
"removeComments": false
}
}
tsconfig.json
{ "extends" : "./tsconfig.Debug.json" }