@kipper/target-ts
Table of contents
Classes
- KipperTypeScriptTarget
- TypeScriptTargetBuiltInGenerator
- TypeScriptTargetCodeGenerator
- TypeScriptTargetSemanticAnalyser
Variables
Functions
Variables
TargetTS
• Const
TargetTS: typeof KipperTypeScriptTarget
= KipperTypeScriptTarget
The TypeScript translation target for the Kipper language.
Alias for KipperTypeScriptTarget.
Since
0.10.0
Defined in
kipper/target-ts/src/target.ts:105
author
• Const
author: "Luna Klatzer"
Defined in
kipper/target-ts/src/index.ts:18
github
• Const
github: "https://github.com/Luna-Klatzer/Kipper"
Defined in
kipper/target-ts/src/index.ts:22
license
• Const
license: "GPL-3.0-or-later"
Defined in
kipper/target-ts/src/index.ts:20
name
• Const
name: "\@kipper/target-ts"
Defined in
kipper/target-ts/src/index.ts:14
version
• Const
version: "0.10.4"
Defined in
kipper/target-ts/src/index.ts:16
Functions
createTSFunctionSignature
▸ createTSFunctionSignature(signature
): string
Generates the TypeScript function signature, based on the signature metadata.
Since
0.10.0
Parameters
Name | Type | Description |
---|---|---|
signature |
Object |
The function signature metadata. |
signature.identifier |
string |
- |
signature.params |
{ identifier : string ; type : any }[] |
- |
signature.returnType |
any |
- |
Returns
string
Defined in
kipper/target-ts/src/tools.ts:55
genTSVariable
▸ genTSVariable(varSpec
, value
): TranslatedCodeLine
Generates a JavaScript local or global variable from the given variable and value.
Parameters
Name | Type | Description |
---|---|---|
varSpec |
BuiltInVariable |
The variable to generate. |
value |
string |
The value of the variable. |
Returns
TranslatedCodeLine
Defined in
kipper/target-ts/src/built-in-generator.ts:45
getTSFunction
▸ getTSFunction(signature
, body
): TranslatedCodeLine
[]
Generates a TypeScript function from the given signature and body.
Since
0.10.0
Parameters
Name | Type | Description |
---|---|---|
signature |
Object |
The signature of the function. |
signature.identifier |
string |
- |
signature.params |
{ identifier : string ; type : any }[] |
- |
signature.returnType |
any |
- |
body |
string |
The body of the function. |
Returns
TranslatedCodeLine
[]
Defined in
kipper/target-ts/src/built-in-generator.ts:18
getTSFunctionSignature
▸ getTSFunctionSignature(funcSpec
): Object
Generates the signature for the function based on the funcSpec, which can be used in an TypeScript env.
Since
0.10.0
Parameters
Name | Type | Description |
---|---|---|
funcSpec |
any |
The function spec object containing the metadata of the function. |
Returns
Object
Name | Type |
---|---|
identifier |
string |
params |
{ identifier : string ; type : KipperCompilableType | KipperCompilableType [] }[] |
returnType |
KipperCompilableType | KipperCompilableType [] |
Defined in
kipper/target-ts/src/tools.ts:20