typescript.api
Advanced tools
Comparing version 0.5.1 to 0.5.2
@@ -34,5 +34,7 @@ // Copyright (c) sinclair 2013. All rights reserved. | ||
class ReflectedType { | ||
class ReflectedType | ||
{ | ||
public identifier : string; | ||
public name : string; | ||
public scope : string []; | ||
} | ||
@@ -42,6 +44,3 @@ | ||
{ | ||
public name : string; | ||
public type : typescript.api.Type; | ||
public limChar : number; | ||
public minChar : number; | ||
public type : typescript.api.Type;r; | ||
} | ||
@@ -51,4 +50,2 @@ | ||
{ | ||
public name : string; | ||
public fullname : string; | ||
public parameters : Array<typescript.api.Parameter>; | ||
@@ -69,4 +66,2 @@ public returns : typescript.api.Type; | ||
public comments : string[]; | ||
public limChar : number; | ||
public minChar : number; | ||
} | ||
@@ -76,8 +71,5 @@ | ||
{ | ||
public name : string; | ||
public arguments : Array<Type>; | ||
public signature : Method; | ||
public arrayCount : number; | ||
public limChar : number; | ||
public minChar : number; | ||
} | ||
@@ -87,3 +79,2 @@ | ||
{ | ||
public name : string; | ||
public fullname : string; | ||
@@ -99,4 +90,2 @@ public type : typescript.api.Type; | ||
public comments : string[]; | ||
public limChar : number; | ||
public minChar : number; | ||
} | ||
@@ -111,6 +100,2 @@ | ||
public isExported : boolean; | ||
public name : string; | ||
public fullname : string; | ||
public limChar : number; | ||
public minChar : number; | ||
} | ||
@@ -126,6 +111,2 @@ | ||
public isExported : boolean; | ||
public name : string; | ||
public fullname : string; | ||
public limChar : number; | ||
public minChar : number; | ||
} | ||
@@ -142,11 +123,6 @@ | ||
public isExported : boolean; | ||
public name : string; | ||
public fullname : string; | ||
public limChar : number; | ||
public minChar : number; | ||
} | ||
class Script extends ReflectedType | ||
{ | ||
public path : string; | ||
public modules : Array<typescript.api.Module>; | ||
@@ -158,7 +134,2 @@ public interfaces : Array<typescript.api.Interface>; | ||
} | ||
class Reflection | ||
{ | ||
public scripts: Array<typescript.api.Script>; | ||
} | ||
@@ -210,4 +181,2 @@ class Unit | ||
export function compile (sourceUnits: Array<typescript.api.SourceUnit>, callback : (compiledUnit:Array<typescript.api.CompiledUnit> )=> void) : void; | ||
export function reflect (compiledUnits:Array<typescript.api.CompiledUnit>, callback :{ ( reflection:typescript.api.Reflection ): void; }) : void; | ||
@@ -214,0 +183,0 @@ export function run (compiledUnits:Array<typescript.api.CompiledUnit>, sandbox:any, callback :{ (context:any): void; }) : void; |
20
index.js
@@ -167,21 +167,9 @@ var _vm = require("vm"); | ||
} | ||
exports.compiler.compile(sourceUnits, callback); | ||
exports.compiler.compile(sourceUnits, function (compiledUnits) { | ||
callback(compiledUnits); | ||
}); | ||
} | ||
exports.compile = compile; | ||
function reflect(compiledUnits, callback) { | ||
var api = load_typescript_api(); | ||
var reflection = new api.Reflect.Reflection(); | ||
for (var n in compiledUnits) { | ||
var script = api.Reflect.Script.create(compiledUnits[n].path, compiledUnits[n].ast); | ||
reflection.scripts.push(script); | ||
} | ||
callback(reflection); | ||
} | ||
exports.reflect = reflect; | ||
function run(compiledUnits, sandbox, callback) { | ||
@@ -188,0 +176,0 @@ try { |
{ | ||
"name": "typescript.api", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"description": "A compiler as a service api enabling nodejs developers to programatically resolve, compile, reflect and run typescript 0.9 source files.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is too big to display
3133671
59167