parent
bf4b75ee9c
commit
894af28529
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
{%- macro memberInfo(member) -%}
|
{%- macro memberInfo(member) -%}
|
||||||
{$ commentBlock(member, 5) $}
|
{$ commentBlock(member, 5) $}
|
||||||
{$ member.name $}{% if member.optional %}?{% endif -%}
|
{% if member.isStatic -%}static {% endif -%}{$ member.name $}{% if member.optional %}?{% endif -%}
|
||||||
{% if member.typeParameters %}<{% for typeParam in member.typeParameters %}{$ typeParam $}{% if not loop.last %}, {% endif %}{% endfor %}>{% endif -%}
|
{% if member.typeParameters %}<{% for typeParam in member.typeParameters %}{$ typeParam $}{% if not loop.last %}, {% endif %}{% endfor %}>{% endif -%}
|
||||||
{%- if member.parameters -%}({% for param in member.parameters %}{$ param $}{% if not loop.last %}, {% endif %}{% endfor %}){%- endif -%}
|
{%- if member.parameters -%}({% for param in member.parameters %}{$ param $}{% if not loop.last %}, {% endif %}{% endfor %}){%- endif -%}
|
||||||
{%- if member.returnType -%}
|
{%- if member.returnType -%}
|
||||||
|
@ -58,6 +58,9 @@ declare module {$ module.namespace $} {
|
||||||
{%- if export.callMember %}
|
{%- if export.callMember %}
|
||||||
{$ memberInfo(export.callMember) $}
|
{$ memberInfo(export.callMember) $}
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
{%- for static in export.statics %}
|
||||||
|
{$ memberInfo(static) $}
|
||||||
|
{%- endfor -%}
|
||||||
{%- for member in export.members %}
|
{%- for member in export.members %}
|
||||||
{$ memberInfo(member) $}
|
{$ memberInfo(member) $}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
|
|
@ -64,6 +64,7 @@ module.exports = function readTypeScriptModules(tsParser, modules, getFileInfo,
|
||||||
log.debug('>>>> EXPORT: ' + exportDoc.name + ' (' + exportDoc.docType + ') from ' + moduleDoc.id);
|
log.debug('>>>> EXPORT: ' + exportDoc.name + ' (' + exportDoc.docType + ') from ' + moduleDoc.id);
|
||||||
|
|
||||||
exportDoc.members = [];
|
exportDoc.members = [];
|
||||||
|
exportDoc.statics = [];
|
||||||
|
|
||||||
// Generate docs for each of the export's members
|
// Generate docs for each of the export's members
|
||||||
if (resolvedExport.flags & ts.SymbolFlags.HasMembers) {
|
if (resolvedExport.flags & ts.SymbolFlags.HasMembers) {
|
||||||
|
@ -102,6 +103,16 @@ module.exports = function readTypeScriptModules(tsParser, modules, getFileInfo,
|
||||||
docs.push(memberDoc);
|
docs.push(memberDoc);
|
||||||
exportDoc.members.push(memberDoc);
|
exportDoc.members.push(memberDoc);
|
||||||
}
|
}
|
||||||
|
} else if (resolvedExport.flags & ts.SymbolFlags.HasExports) {
|
||||||
|
for (var exported in resolvedExport.exports) {
|
||||||
|
if (exported === 'prototype') continue;
|
||||||
|
if (hidePrivateMembers && exported.charAt(0) === '_') continue;
|
||||||
|
var memberSymbol = resolvedExport.exports[exported];
|
||||||
|
var memberDoc = createMemberDoc(memberSymbol, exportDoc, basePath, parseInfo.typeChecker);
|
||||||
|
memberDoc.isStatic = true;
|
||||||
|
docs.push(memberDoc);
|
||||||
|
exportDoc.statics.push(memberDoc);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sortClassMembers) {
|
if (sortClassMembers) {
|
||||||
|
|
|
@ -16,9 +16,6 @@ export {TypeLiteral} from './type_literal';
|
||||||
* injector to index in arrays rather than looking up items in maps.
|
* injector to index in arrays rather than looking up items in maps.
|
||||||
*/
|
*/
|
||||||
export class Key {
|
export class Key {
|
||||||
/**
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
constructor(public token: Object, public id: number) {
|
constructor(public token: Object, public id: number) {
|
||||||
if (isBlank(token)) {
|
if (isBlank(token)) {
|
||||||
throw new BaseException('Token must be defined!');
|
throw new BaseException('Token must be defined!');
|
||||||
|
|
Loading…
Reference in New Issue