Skip to content

Commit

Permalink
Recompiled TypeDoc with TypeScript 1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-lenz committed Dec 8, 2015
1 parent ea0e6ef commit 53bb762
Show file tree
Hide file tree
Showing 66 changed files with 301 additions and 566 deletions.
9 changes: 1 addition & 8 deletions gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,7 @@ module.exports = function(grunt)
pkg: grunt.file.readJSON('package.json'),
ts: {
typedoc: {
options: {
basePath: 'src',
declaration: true,
comments: true,
sourceMap: false
},
src: ['src/**/*.ts'],
out: 'bin/typedoc.js'
tsconfig: true
},
typescript: {
options: {
Expand Down
15 changes: 4 additions & 11 deletions lib/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var Path = require("path");
var FS = require("fs");
var typescript = require("typescript");
Expand Down Expand Up @@ -153,28 +150,24 @@ var Application = (function (_super) {
help: 'Specify the logger that should be used, \'none\' or \'console\'',
defaultValue: 'console',
type: declaration_1.ParameterType.Mixed,
}),
__metadata('design:type', Object)
})
], Application.prototype, "loggerType", void 0);
__decorate([
component_1.Option({
name: 'ignoreCompilerErrors',
help: 'Should TypeDoc generate documentation pages even after the compiler has returned errors?',
type: declaration_1.ParameterType.Boolean
}),
__metadata('design:type', Boolean)
})
], Application.prototype, "ignoreCompilerErrors", void 0);
__decorate([
component_1.Option({
name: 'exclude',
help: 'Define a pattern for excluded files when specifying paths.',
type: declaration_1.ParameterType.String
}),
__metadata('design:type', String)
})
], Application.prototype, "exclude", void 0);
Application = __decorate([
component_1.Component({ name: "application", internal: true }),
__metadata('design:paramtypes', [Object])
component_1.Component({ name: "application", internal: true })
], Application);
return Application;
})(component_1.ChildableComponent);
Expand Down
15 changes: 4 additions & 11 deletions lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var typescript = require("typescript");
var application_1 = require("./application");
var component_1 = require("./utils/component");
Expand Down Expand Up @@ -80,34 +77,30 @@ var CliApplication = (function (_super) {
name: 'out',
help: 'Specifies the location the documentation should be written to.',
hint: declaration_1.ParameterHint.Directory
}),
__metadata('design:type', String)
})
], CliApplication.prototype, "out", void 0);
__decorate([
component_1.Option({
name: 'json',
help: 'Specifies the location and file name a json file describing the project is written to.',
hint: declaration_1.ParameterHint.File
}),
__metadata('design:type', String)
})
], CliApplication.prototype, "json", void 0);
__decorate([
component_1.Option({
name: 'version',
short: 'v',
help: 'Print the TypeDoc\'s version.',
type: declaration_1.ParameterType.Boolean
}),
__metadata('design:type', Boolean)
})
], CliApplication.prototype, "version", void 0);
__decorate([
component_1.Option({
name: 'help',
short: 'h',
help: 'Print this message.',
type: declaration_1.ParameterType.Boolean
}),
__metadata('design:type', Boolean)
})
], CliApplication.prototype, "help", void 0);
return CliApplication;
})(application_1.Application);
Expand Down
4 changes: 2 additions & 2 deletions lib/converter/convert-expression.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ function convertExpression(expression) {
return '"' + expression.text + '"';
case 8:
return expression.text;
case 97:
case 99:
return 'true';
case 82:
case 84:
return 'false';
default:
var source = ts.getSourceFileOfNode(expression);
Expand Down
25 changes: 8 additions & 17 deletions lib/converter/converter.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var ts = require("typescript");
var declaration_1 = require("../utils/options/declaration");
var context_1 = require("./context");
Expand Down Expand Up @@ -68,8 +65,8 @@ var Converter = (function (_super) {
Converter.prototype.removeNodeConverter = function (converter) {
var converters = this.nodeConverters;
var keys = _.keys(this.nodeConverters);
for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {
var key = keys_1[_i];
for (var _i = 0; _i < keys.length; _i++) {
var key = keys[_i];
if (converters[key] === converter) {
delete converters[key];
}
Expand Down Expand Up @@ -190,43 +187,37 @@ var Converter = (function (_super) {
component_1.Option({
name: "name",
help: "Set the name of the project that will be used in the header of the template."
}),
__metadata('design:type', String)
})
], Converter.prototype, "name", void 0);
__decorate([
component_1.Option({
name: "externalPattern",
help: 'Define a pattern for files that should be considered being external.'
}),
__metadata('design:type', String)
})
], Converter.prototype, "externalPattern", void 0);
__decorate([
component_1.Option({
name: "includeDeclarations",
help: 'Turn on parsing of .d.ts declaration files.',
type: declaration_1.ParameterType.Boolean
}),
__metadata('design:type', Boolean)
})
], Converter.prototype, "includeDeclarations", void 0);
__decorate([
component_1.Option({
name: "excludeExternals",
help: 'Prevent externally resolved TypeScript files from being documented.',
type: declaration_1.ParameterType.Boolean
}),
__metadata('design:type', Boolean)
})
], Converter.prototype, "excludeExternals", void 0);
__decorate([
component_1.Option({
name: "excludeNotExported",
help: 'Prevent symbols that are not exported from being documented.',
type: declaration_1.ParameterType.Boolean
}),
__metadata('design:type', Boolean)
})
], Converter.prototype, "excludeNotExported", void 0);
Converter = __decorate([
component_1.Component({ name: "converter", internal: true, childClass: components_1.ConverterComponent }),
__metadata('design:paramtypes', [])
component_1.Component({ name: "converter", internal: true, childClass: components_1.ConverterComponent })
], Converter);
return Converter;
})(component_1.ChildableComponent);
Expand Down
10 changes: 5 additions & 5 deletions lib/converter/factories/comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function createComment(node) {
}
exports.createComment = createComment;
function isTopmostModuleDeclaration(node) {
if (node.nextContainer && node.nextContainer.kind == 216) {
if (node.nextContainer && node.nextContainer.kind == 218) {
var next = node.nextContainer;
if (node.name.end + 1 == next.name.pos) {
return false;
Expand All @@ -18,7 +18,7 @@ function isTopmostModuleDeclaration(node) {
return true;
}
function getRootModuleDeclaration(node) {
while (node.parent && node.parent.kind == 216) {
while (node.parent && node.parent.kind == 218) {
var parent_1 = node.parent;
if (node.name.pos == parent_1.name.end + 1) {
node = parent_1;
Expand All @@ -30,10 +30,10 @@ function getRootModuleDeclaration(node) {
return node;
}
function getRawComment(node) {
if (node.parent && node.parent.kind === 210) {
if (node.parent && node.parent.kind === 212) {
node = node.parent.parent;
}
else if (node.kind === 216) {
else if (node.kind === 218) {
if (!isTopmostModuleDeclaration(node)) {
return null;
}
Expand All @@ -45,7 +45,7 @@ function getRawComment(node) {
var comments = ts.getJsDocComments(node, sourceFile);
if (comments && comments.length) {
var comment;
if (node.kind == 246) {
if (node.kind == 248) {
if (comments.length == 1)
return null;
comment = comments[0];
Expand Down
6 changes: 3 additions & 3 deletions lib/converter/factories/declaration.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function createDeclaration(context, node, kind, name) {
if (kind == index_1.ReflectionKind.ExternalModule) {
isExported = true;
}
else if (node.parent && node.parent.kind == 210) {
else if (node.parent && node.parent.kind == 212) {
isExported = isExported || !!(node.parent.parent.flags & 1);
}
else {
Expand All @@ -51,10 +51,10 @@ function createDeclaration(context, node, kind, name) {
if (nonStaticKinds.indexOf(kind) == -1) {
isStatic = !!(node.flags & 128);
if (container.kind == index_1.ReflectionKind.Class) {
if (node.parent && node.parent.kind == 142) {
if (node.parent && node.parent.kind == 144) {
isConstructorProperty = true;
}
else if (!node.parent || node.parent.kind != 212) {
else if (!node.parent || node.parent.kind != 214) {
isStatic = true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/converter/factories/signature.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function createSignature(context, node, name, kind) {
exports.createSignature = createSignature;
function extractSignatureType(context, node) {
var checker = context.checker;
if (node.kind & 145 || node.kind & 166) {
if (node.kind & 147 || node.kind & 168) {
try {
var signature = checker.getSignatureFromDeclaration(node);
return context.converter.convertType(context, node.type, checker.getReturnTypeOfSignature(signature));
Expand Down
12 changes: 4 additions & 8 deletions lib/converter/nodes/accessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var ts = require("typescript");
var index_1 = require("../../models/index");
var index_2 = require("../factories/index");
Expand All @@ -21,14 +18,14 @@ var AccessorConverter = (function (_super) {
function AccessorConverter() {
_super.apply(this, arguments);
this.supports = [
143,
144
145,
146
];
}
AccessorConverter.prototype.convert = function (context, node) {
var accessor = index_2.createDeclaration(context, node, index_1.ReflectionKind.Accessor);
context.withScope(accessor, function () {
if (node.kind == 143) {
if (node.kind == 145) {
accessor.getSignature = index_2.createSignature(context, node, '__get', index_1.ReflectionKind.GetSignature);
}
else {
Expand All @@ -38,8 +35,7 @@ var AccessorConverter = (function (_super) {
return accessor;
};
AccessorConverter = __decorate([
components_1.Component({ name: 'node:accessor' }),
__metadata('design:paramtypes', [])
components_1.Component({ name: 'node:accessor' })
], AccessorConverter);
return AccessorConverter;
})(components_1.ConverterNodeComponent);
Expand Down
8 changes: 2 additions & 6 deletions lib/converter/nodes/alias.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var ts = require("typescript");
var index_1 = require("../../models/index");
var index_2 = require("../factories/index");
Expand All @@ -21,7 +18,7 @@ var AliasConverter = (function (_super) {
function AliasConverter() {
_super.apply(this, arguments);
this.supports = [
214
216
];
}
AliasConverter.prototype.convert = function (context, node) {
Expand All @@ -33,8 +30,7 @@ var AliasConverter = (function (_super) {
return alias;
};
AliasConverter = __decorate([
components_1.Component({ name: 'node:alias' }),
__metadata('design:paramtypes', [])
components_1.Component({ name: 'node:alias' })
], AliasConverter);
return AliasConverter;
})(components_1.ConverterNodeComponent);
Expand Down
23 changes: 9 additions & 14 deletions lib/converter/nodes/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,16 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var ts = require("typescript");
var index_1 = require("../../models/index");
var index_2 = require("../factories/index");
var components_1 = require("../components");
var component_1 = require("../../utils/component");
var declaration_1 = require("../../utils/options/declaration");
var prefered = [
212,
213,
215
214,
215,
217
];
(function (SourceFileMode) {
SourceFileMode[SourceFileMode["File"] = 0] = "File";
Expand All @@ -33,13 +30,13 @@ var BlockConverter = (function (_super) {
function BlockConverter() {
_super.apply(this, arguments);
this.supports = [
190,
217,
246
192,
219,
248
];
}
BlockConverter.prototype.convert = function (context, node) {
if (node.kind == 246) {
if (node.kind == 248) {
this.convertSourceFile(context, node);
}
else {
Expand Down Expand Up @@ -91,12 +88,10 @@ var BlockConverter = (function (_super) {
'modules': SourceFileMode.Modules
},
defaultValue: SourceFileMode.Modules
}),
__metadata('design:type', Number)
})
], BlockConverter.prototype, "mode", void 0);
BlockConverter = __decorate([
components_1.Component({ name: 'node:block' }),
__metadata('design:paramtypes', [])
components_1.Component({ name: 'node:block' })
], BlockConverter);
return BlockConverter;
})(components_1.ConverterNodeComponent);
Expand Down
Loading

0 comments on commit 53bb762

Please sign in to comment.