Class: TypeScriptTargetCodeGenerator
The TypeScript target-specific code generator for translating Kipper code into TypeScript.
Since
0.8.0
Hierarchy
unknown
↳
TypeScriptTargetCodeGenerator
Table of contents
Constructors
Methods
- castExpression
- classMethodDeclaration
- classPropertyDeclaration
- forceCastExpression
- functionDeclaration
- interfaceDeclaration
- interfaceMethodDeclaration
- interfacePropertyDeclaration
- lambdaPrimaryExpression
- objectPrimaryExpression
- parameterDeclaration
- tryCastExpression
- variableDeclaration
Constructors
constructor
• new TypeScriptTargetCodeGenerator()
Inherited from
JavaScriptTargetCodeGenerator.constructor
Methods
castExpression
▸ castExpression(node
): Promise
<TranslatedExpression
>
Translates a CastExpression into the TypeScript language.
Parameters
Name | Type |
---|---|
node |
CastExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-ts/src/code-generator.ts:279
classMethodDeclaration
▸ classMethodDeclaration(node
): Promise
<TranslatedCodeLine
[]>
Translates a ClassMethodDeclaration into the TypeScript language.
Parameters
Name | Type |
---|---|
node |
ClassMethodDeclaration |
Returns
Promise
<TranslatedCodeLine
[]>
Defined in
kipper/target-ts/src/code-generator.ts:237
classPropertyDeclaration
▸ classPropertyDeclaration(node
): Promise
<TranslatedCodeLine
>
Translates a ClassMethodDeclaration into the TypeScript language.
Parameters
Name | Type |
---|---|
node |
ClassPropertyDeclaration |
Returns
Promise
<TranslatedCodeLine
>
Defined in
kipper/target-ts/src/code-generator.ts:268
forceCastExpression
▸ forceCastExpression(node
): Promise
<TranslatedExpression
>
Translates a ForceCastExpression into the JavaScript language.
Since
0.12.0
Parameters
Name | Type |
---|---|
node |
ForceCastExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-ts/src/code-generator.ts:321
functionDeclaration
▸ functionDeclaration(node
): Promise
<TranslatedCodeLine
[]>
Translates a FunctionDeclaration into the TypeScript language.
Parameters
Name | Type |
---|---|
node |
FunctionDeclaration |
Returns
Promise
<TranslatedCodeLine
[]>
Defined in
kipper/target-ts/src/code-generator.ts:36
interfaceDeclaration
▸ interfaceDeclaration(node
): Promise
<TranslatedCodeLine
[]>
Translates a InterfaceDeclaration into the TypeScript language.
Parameters
Name | Type |
---|---|
node |
InterfaceDeclaration |
Returns
Promise
<TranslatedCodeLine
[]>
Defined in
kipper/target-ts/src/code-generator.ts:87
interfaceMethodDeclaration
▸ interfaceMethodDeclaration(node
): Promise
<TranslatedCodeLine
[]>
Translates a InterfaceMethodDeclaration into the TypeScript language.
Parameters
Name | Type |
---|---|
node |
InterfaceMethodDeclaration |
Returns
Promise
<TranslatedCodeLine
[]>
Defined in
kipper/target-ts/src/code-generator.ts:109
interfacePropertyDeclaration
▸ interfacePropertyDeclaration(node
): Promise
<TranslatedCodeLine
[]>
Translates a InterfacePropertyDeclaration into the TypeScript language.
Parameters
Name | Type |
---|---|
node |
InterfacePropertyDeclaration |
Returns
Promise
<TranslatedCodeLine
[]>
Defined in
kipper/target-ts/src/code-generator.ts:142
lambdaPrimaryExpression
▸ lambdaPrimaryExpression(node
): Promise
<TranslatedExpression
>
Translates a LambdaPrimaryExpression into the TypeScript language.
Parameters
Name | Type |
---|---|
node |
LambdaPrimaryExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-ts/src/code-generator.ts:157
objectPrimaryExpression
▸ objectPrimaryExpression(node
): Promise
<TranslatedExpression
>
Translates a ObjectPrimaryExpression into the TypeScript language.
Parameters
Name | Type |
---|---|
node |
ObjectPrimaryExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-ts/src/code-generator.ts:221
parameterDeclaration
▸ parameterDeclaration(node
): Promise
<TranslatedCodeLine
[]>
Translates a ParameterDeclaration into the TypeScript language.
Parameters
Name | Type |
---|---|
node |
ParameterDeclaration |
Returns
Promise
<TranslatedCodeLine
[]>
Defined in
kipper/target-ts/src/code-generator.ts:208
tryCastExpression
▸ tryCastExpression(node
): Promise
<TranslatedExpression
>
Translates a TryCastExpression into the JavaScript language.
Since
0.12.0
Parameters
Name | Type |
---|---|
node |
TryCastExpression |
Returns
Promise
<TranslatedExpression
>
Defined in
kipper/target-ts/src/code-generator.ts:291
variableDeclaration
▸ variableDeclaration(node
): Promise
<TranslatedCodeLine
[]>
Translates a VariableDeclaration into the TypeScript language.
Parameters
Name | Type |
---|---|
node |
VariableDeclaration |
Returns
Promise
<TranslatedCodeLine
[]>
Defined in
kipper/target-ts/src/code-generator.ts:50