1 Compiler

Class Ax.ts.Compiler


TypeScript compiler.

Constructor Summary

Method
Description
Creates a new TypeScript compiler instance.
JSTSCompiler(boolean debug)
Creates a new TypeScript compiler instance.

Method Summary

Modifier and Type
Method
Description
int 
compile(Ax.text.String source)
Compiles the given source code.
int 
compile(Ax.text.String source,boolean addAxDefinitions)
Compiles the given source code.
Ax.text.String 
Gets the compiled code.
Ax.text.String 
getCompiledCode(Ax.text.String filename)
Gets the compile coded in the .
Ax.text.String 
Gets the compilation errors.
Gets all the compiled files.
Ax.text.String 
Returns the loaded Ax definitions.
Ax.ts.Compiler 
setOption(Ax.text.String name,Ax.text.String value)
Sets the given compilation option.
Ax.ts.Compiler 
Sets the resource handling function that will be called from the compiler to resolve imports.
Ax.ts.Compiler 
setTarget(Ax.text.String target)
Sets the --target compilation option.

Constructor Detail

Ax.ts.Compiler.JSTSCompiler

Ax.ts.Compiler.JSTSCompiler()
Info:
Creates a new TypeScript compiler instance.

Ax.ts.Compiler.JSTSCompiler

Ax.ts.Compiler.JSTSCompiler(
	boolean debug
						)
Info:
Creates a new TypeScript compiler instance.
Parameters:
debug - enables/disables debugging

Method Detail

Ax.ts.Compiler.compile

smallint Ax.ts.Compiler.compile(
	string source
)
Info:
Compiles the given source code.
Parameters:
source - the ts code to compile
Returns:
smallint

Ax.ts.Compiler.compile

smallint Ax.ts.Compiler.compile(
	string source,
	boolean addAxDefinitions
)
Info:
Compiles the given source code.
Parameters:
source - the ts code to compile
addAxDefinitions - whether to add Ax definitions
Returns:
smallint

Ax.ts.Compiler.getCompiledCode

string Ax.ts.Compiler.getCompiledCode()
Info:
Gets the compiled code.
Returns:
string

Ax.ts.Compiler.getCompiledCode

string Ax.ts.Compiler.getCompiledCode(
	string filename
)
Info:
Gets the compile coded in the .js filename.
Parameters:
filename - 
Returns:
string

Ax.ts.Compiler.getCompiledErrors

string Ax.ts.Compiler.getCompiledErrors()
Info:
Gets the compilation errors.
Returns:
string

Ax.ts.Compiler.getCompiledFiles

string[] Ax.ts.Compiler.getCompiledFiles()
Info:
Gets all the compiled files.
Returns:
string[]

Ax.ts.Compiler.loadAxDefinition

string Ax.ts.Compiler.loadAxDefinition()
Info:
Returns the loaded Ax definitions.
Returns:
string

Ax.ts.Compiler.setOption

object Ax.ts.Compiler.setOption(
	string name,
	string value
)
Info:
Sets the given compilation option.
Parameters:
name - the compilaion option
value - he option value
Returns:
object

Ax.ts.Compiler.setResourceHandler

object Ax.ts.Compiler.setResourceHandler(
	object handler
)
Info:
Sets the resource handling function that will be called from the compiler to resolve imports.
Parameters:
handler - the resource handling function
Returns:
object

Ax.ts.Compiler.setTarget

object Ax.ts.Compiler.setTarget(
	string target
)
Info:
Sets the --target compilation option.
Parameters:
target - the option value
Returns:
object