Permalink
Browse files

tools, bugfix: [tsdeclare] fix expression of exported-statically clas…

…s. (#438)
  • Loading branch information...
richardo2016 authored and xicilion committed Jun 18, 2018
1 parent 8de2cfd commit e43fbf2c11f0f2cab83e972310f2242a49a3f485
Showing with 6 additions and 5 deletions.
  1. +6 −5 tools/util/tmpl/type.d.ts.txt
@@ -180,19 +180,20 @@ declare module "<%- def.declare.name %>" {
<% for(var i=0; i<member_objects.length; i++) {
var internalObj = member_objects[i]
var objectName = internalObj.type || internalObj.name
var objectName = internalObj.name
var objectType = internalObj.type || internalObj.name
// var str = JSON.stringify(internalObj)
var isInternalClass = !!defObjects[objectName]
var isInternalModule = !!defModules[objectName]
var isInternalClass = !!defObjects[objectType]
var isInternalModule = !!defModules[objectType]
%>
/**
* <% var comments = internalObj.comments.split('\n'); for(var idx=0; idx<comments.length; idx++) {var comment = comments[idx].trim().replace('! @', '@') %>
* <%- comment %><% } %>
* <%- internalObj.deprecated ? '@deprecated' : '' %>
* <%- internalObj.async ? '@async' : '' %>
*/
<% if (isInternalClass) {%>export class <%- objectName %> extends <%- _fns.uglifyInternalClassName(objectName) %> {}<%}%>
<% if (isInternalModule) {%>export const <%- objectName %>: typeof <%- _fns.getAliasNameForRefModule(objectName) %><%}%>
<% if (isInternalClass) {%>export class <%- objectName %> extends <%- _fns.uglifyInternalClassName(objectType) %> {}<%}%>
<% if (isInternalModule) {%>export const <%- objectName %>: typeof <%- _fns.getAliasNameForRefModule(objectType) %><%}%>
<% } /** end of iteration 'member_objects' */ %>
<% for(var i=0; i<member_fns.length; i++) {

0 comments on commit e43fbf2

Please sign in to comment.