Fixed some minor issues within the declaration tool generator

canary
WolverinDEV 2020-06-10 18:29:33 +02:00
parent 804f8de18d
commit 116779d151
9 changed files with 6 additions and 91 deletions

View File

@ -24,11 +24,5 @@ function generate_declaration() {
#Generate the loader definitions first
app_declaration="../declarations/shared-app/"
loader_declaration_app="../declarations/loader/"
# loader_declaration_certaccept="declarations/exports_loader_certaccept.d.ts"
generate_declaration dtsconfig_app.json ${app_declaration}
generate_declaration dtsconfig_loader_app.json ${loader_declaration_app}
# generate_declaration dtsconfig_loader_certaccept.json ${loader_declaration_certaccept}
exit 0

View File

@ -1,7 +0,0 @@
{
"source_files": [
"../loader/loader.ts",
"../loader/app.ts"
],
"target_file": "../declarations/exports_loader_app.d.ts"
}

View File

@ -1,7 +0,0 @@
{
"source_files": [
"../loader/loader.ts",
"../loader/certaccept.ts"
],
"target_file": "../declarations/exports_loader_certaccept.d.ts"
}

View File

@ -1,16 +0,0 @@
/* general shared project config */
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"sourceMap": true,
"experimentalDecorators": true,
"plugins": [ ]
},
"include": [
"../types",
"../declarations/exports_loader_certaccept.d.ts",
"../popup/certaccept/js/**/*.ts",
"../js/BrowserIPC.ts"
]
}

View File

@ -1,18 +0,0 @@
/* general shared project config */
{
"compilerOptions": {
"target": "es6",
"module": "none",
"outFile": "../generated/certaccept.js",
"plugins": [ ]
},
"include": [
"../types",
"../declarations/exports_loader_certaccept.d.ts",
"../popup/certaccept/js/**/*.ts",
"../js/BrowserIPC.ts",
"../js/settings.ts",
"../js/proto.ts",
"../js/log.ts"
]
}

View File

@ -1,16 +0,0 @@
{
"compilerOptions": {
"target": "es6",
"module": "none",
"sourceMap": true,
"outFile": "../generated/loader_app.js"
},
"include": [
"../types",
"../declarations/imports_*.d.ts",
"../declarations/exports_app.d.ts", /* lets include them because we require stuff like the log */
"../loader/loader.ts",
"../loader/app.ts",
"../backend"
]
}

View File

@ -1,18 +0,0 @@
{
"compilerOptions": {
"target": "es6",
"module": "none",
"sourceMap": true,
"outFile": "../generated/loader_certaccept.js"
},
"include": [
"../types",
"../loader/loader.ts",
"../loader/certaccept.ts",
/*
Lets include them because we require stuff like the log.
More sense would it to make an extra d.ts file for that, but who cares
*/
"../declarations/exports_app.d.ts"
]
}

View File

@ -13,5 +13,3 @@ export function fix_declare_global(nodes: ts.Node[]) : ts.Node[] {
return [];
}
SyntaxKind.PlusEqualsToken

View File

@ -255,6 +255,11 @@ function analyze_type_node(node: ts.TypeNode | ts.LeftHandSideExpression, data:
analyze_type_node(pae.expression, data);
break;
case SyntaxKind.ConstructorType:
let ct = node as ts.ConstructorTypeNode;
analyze_type_node(ct.type, data);
break;
default:
throw "Unknown type " + SyntaxKind[node.kind] + ". Extend me :)";
}