• Kipper

    v0.12.1
  • Downloads

  • Docs

  • Playground

  • Changelog

  • Kipper

    v0.12.1
    • Downloads

    • Docs

    • Playground

    • Changelog

      • 0.11.0 /
      • Kipper API /
      • Module /
      • @kipper/target-ts /
      • index
    Kipper Docs
    • next
    • latest
    • 0.11.0
    • 0.10.4
    • 0.9.2
    • Overview

    • Quickstart

    • Goals for Kipper

    • Supported platforms

    • Usage Examples

      • Overview

      • Compiler Setup

        • Overview

          • index

          • compiler

          • errors

          • logger

          • utils

          • config

          • index

          • index

        • Overview

        • new

        • run

        • compile

        • help

        • version

    • Variables

      • Overview

      • String Type

      • Number Type

      • Boolean Type

      • Void Type

      • Null Type

      • Undefined Type

      • Array Type

      • Overview

      • Arithmetic Expression

      • Assignment Expression

      • Conditional Expressions

      • Logical Expressions

      • Bitwise Expression

      • Relational Expressions

      • Convert Expression

      • F-String Expression

      • Member Access Expression

      • Function Call Expression

      • Overview

      • Expression Statement

      • If Statement

      • While Loop

      • Do-While Loop

      • For Loop

      • Compound Statement

      • Jump Statement

    • Functions

    • Comments

    • Built-in Functions

      • 0.11.0 /
      • Kipper API /
      • Module /
      • @kipper/target-ts /
      • index
    • 0.11.0 /
    • Kipper API /
    • Module /
    • @kipper/target-ts /
    • index

    Edit page

    @kipper/target-ts

    Table of contents

    Classes

    • KipperTypeScriptTarget
    • TypeScriptTargetBuiltInGenerator
    • TypeScriptTargetCodeGenerator
    • TypeScriptTargetSemanticAnalyser

    Variables

    • TargetTS
    • author
    • github
    • license
    • name
    • version

    Functions

    • createTSFunctionSignature
    • genTSFunction
    • genTSVariable
    • getTSFunctionSignature

    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:103


    author

    • Const author: "Luna Klatzer"

    Defined in

    kipper/target-ts/src/index.ts:18


    github

    • Const github: "https://github.com/Kipper-Lang/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.11.0"

    Defined in

    kipper/target-ts/src/index.ts:16

    Functions

    createTSFunctionSignature

    ▸ createTSFunctionSignature(signature, ignoreParams?): string

    Generates the TypeScript function signature, based on the signature metadata.

    Since

    0.10.0

    Parameters

    Name Type Default value Description
    signature Object undefined The function signature metadata.
    signature.identifier string undefined -
    signature.params { identifier: string ; type: any }[] undefined -
    signature.returnType any undefined -
    ignoreParams boolean false Whether or not to ignore the parameters of the function.

    Returns

    string

    Defined in

    kipper/target-ts/src/tools.ts:56


    genTSFunction

    ▸ genTSFunction(signature, body, ignoreParams?): TranslatedCodeLine[]

    Generates a TypeScript function from the given signature and body.

    Since

    0.10.0

    Parameters

    Name Type Default value Description
    signature Object undefined The signature of the function.
    signature.identifier string undefined -
    signature.params { identifier: string ; type: any }[] undefined -
    signature.returnType any undefined -
    body string undefined The body of the function.
    ignoreParams boolean false Whether or not to ignore the parameters of the function.

    Returns

    TranslatedCodeLine[]

    Defined in

    kipper/target-ts/src/built-in-generator.ts:19


    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:47


    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

  • Developed at and supported by:

    • Releases
    • GitHub
    • Security
    • Issue Tracker
    • License
  • Copyright © 2021-2025 Luna Klatzer, Lorenz Holzbauer & Fabian Baitura.
    Kipper is licensed under the GPL-3.0-or-later license.