# @kipper/target-ts

> The TypeScript target for the Kipper compiler 🦊

Latest version **0.12.1** (published 2025-02-17) · GPL-3.0-or-later license · 0 weekly downloads

## Install

```sh
npm install @kipper/target-ts
pnpm add @kipper/target-ts
yarn add @kipper/target-ts
bun add @kipper/target-ts
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: has types; no vulnerabilities; high maintenance score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 0.12.1 |
| Published | 2025-02-17 |
| First published | 2022-08-11 |
| Weekly downloads | 0 |
| License | GPL-3.0-or-later |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | 16.x \|\| 18.x \|\| 20.x \|\| 22.x |
| Dependencies | 3 |
| Unpacked size | 105.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 28 |
| Author | Luna-Klatzer @Luna-Klatzer |
| Maintainers | luna-klatzer |
| Keywords | kipper, language, backend, transpile, target |

## Links

- npm: https://www.npmjs.com/package/@kipper/target-ts
- Repository: https://github.com/Kipper-Lang/Kipper
- Homepage: https://kipper-lang.org
- Issues: https://github.com/Kipper-Lang/Kipper/issues
- npm.io page: https://npm.io/package/@kipper/target-ts

## Dependencies (3)

- [tslib](https://npm.io/package/tslib.md) ~2.6.2
- [@kipper/core](https://npm.io/package/@kipper/core.md) ~0.12.1
- [@kipper/target-js](https://npm.io/package/@kipper/target-js.md) ~0.12.1

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.12.1 (latest) — 2025-02-17
- 0.13.0-alpha.2 (next) — 2025-02-26
- 0.12.0-rc.0 (rc) — 2024-09-18
- 0.12.0-beta.0 (beta) — 2024-09-18
- 0.13.0-alpha.1 — 2025-02-26
- 0.13.0-alpha.0 — 2025-02-17
- 0.12.0 — 2024-09-25
- 0.12.0-alpha.6 — 2024-09-17
- 0.12.0-alpha.5 — 2024-09-16
- 0.12.0-alpha.4 — 2024-09-15
- 0.12.0-alpha.3 — 2024-09-07
- 0.12.0-alpha.2 — 2024-09-07
- 0.12.0-alpha.1 — 2024-07-24
- 0.12.0-alpha.0 — 2024-07-17
- 0.11.0 — 2024-07-10
- … 23 more at https://npm.io/package/@kipper/target-ts/versions

## README

![](https://github.com/Kipper-Lang/Kipper/raw/main/img/Kipper-Logo-with-head.png)

# Kipper TypeScript Target - `@kipper/target-ts` 🦊⌨️

[![Version](https://img.shields.io/npm/v/@kipper/target-ts?label=npm%20stable&color=%23cd2620&logo=npm)](https://npmjs.org/package/kipper)
[![Dev Version](https://img.shields.io/github/v/tag/Kipper-Lang/Kipper?include_prereleases&label=dev&logo=github&sort=semver)](https://github.com/Kipper-Lang/Kipper/tags)
[![codecov](https://codecov.io/gh/Kipper-Lang/Kipper/branch/main/graph/badge.svg?token=S4RQT7X3YP)](https://codecov.io/gh/Kipper-Lang/Kipper)
[![Issues](https://img.shields.io/github/issues/Kipper-Lang/Kipper)](https://github.com/Kipper-Lang/Kipper/issues)
[![License](https://img.shields.io/github/license/Kipper-Lang/Kipper?color=cyan)](https://github.com/Kipper-Lang/Kipper/blob/main/LICENSE)
[![Install size](https://packagephobia.com/badge?p=@kipper/target-ts)](https://packagephobia.com/result?p=@kipper/target-ts)
[![Publish size](https://badgen.net/packagephobia/publish/@kipper/target-ts)](https://packagephobia.com/result?p=@kipper/target-ts)
[![DOI](https://zenodo.org/badge/411260595.svg)](https://zenodo.org/badge/latestdoi/411260595)

The TypeScript target for the Kipper Compiler. ⌨️✨

Kipper is a JavaScript-like strongly and strictly typed language with Python flavour. It aims to provide
straightforward, simple, secure and type-safe coding with better efficiency and developer satisfaction!

It compiles to both JavaScript and TypeScript, and can be set up in your terminal, Node.js or ES6+ browser. 🦊

_For more details, you can read more about this project on the [project repository](https://github.com/Kipper-Lang/Kipper)
and the [Kipper website](https://kipper-lang.org)._

## Installation

To install the package, run the following command:

```bash
npm i @kipper/target-ts
```

If you are using `pnpm` or `yarn`, use `pnpm i @kipper/target-ts` or `yarn add @kipper/target-ts`.

## General Information

- Website: https://kipper-lang.org
- Docs: https://docs.kipper-lang.org
- Playground: https://play.kipper-lang.org
- Issue Tracker: https://issues.kipper-lang.org
- Roadmap: [View Kipper Roadmap 🦊🚧](https://github.com/Kipper-Lang/Kipper/discussions/139)
- Changelog: [View CHANGELOG.md](https://github.com/Kipper-Lang/Kipper/blob/main/CHANGELOG.md)

## Usage

If you are using `@kipper/cli` then this package is automatically installed and compiling to JavaScript can be done
using the `--target=js` flag, for example:

```bash
kipper compile example-script.kip --target=js
```

Otherwise, simply import the target and specify it in the `compilerOptions` field of `KipperCompiler.compile()`, for example:

- JavaScript (CommonJS):

  ```js
  const fs = require("fs").promises;
  const kipper = require("@kipper/core");
  const kipperTS = require("@kipper/target-ts");

  const path = "INSERT_PATH";
  fs.readFile(path, "utf8").then(async (fileContent) => {
  	const compiler = new kipper.KipperCompiler();

  	// Compile the code string or stream
  	let result = await compiler.compile(fileContent, { target: new kipperTS.TargetTS() });
  	let jsCode = result.write();

  	// Running the Kipper program
  	eval(jsCode);
  });
  ```

- TypeScript (CommonJS):

  ```ts
  import { promises as fs } from "fs";
  import { KipperCompiler } from "@kipper/core";
  import { TargetTS } from "@kipper/target-ts";

  const path = "INSERT_PATH";
  fs.readFile(path, "utf8" as BufferEncoding).then(async (fileContent: string) => {
  	const compiler = new KipperCompiler();

  	// Compile the code string or stream
  	let result = await compiler.compile(fileContent, { target: new TargetTS() });
  	let tsCode = result.write();
  });
  ```

## Kipper Docs

Proper documentation for the Kipper language is available at https://docs.kipper-lang.org!

## Contributing to Kipper

If you want to contribute to Kipper, we have a full guide explaining the structure of Kipper and how to use GitHub
issues and pull requests. Check it out [here](https://github.com/Kipper-Lang/Kipper/blob/main/CONTRIBUTING.md)!

If you have any questions or concerns, you can open up a discussion page [here](https://github.com/Kipper-Lang/Kipper/discussions)!

We appreciate any feedback or help! Kipper is open-source and free for anyone, help us make it even better! 🦊❤️

## Copyright and License

![License](https://img.shields.io/github/license/Kipper-Lang/Kipper?color=cyan)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FLuna-Klatzer%2FKipper.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2FLuna-Klatzer%2FKipper?ref=badge_shield)

Copyright (C) 2021-2024 Luna Klatzer

This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with
this program. If not, see <https://www.gnu.org/licenses/>.

See the [LICENSE](https://raw.githubusercontent.com/Kipper-Lang/Kipper/main/LICENSE)
for information on terms & conditions for usage.

### FOSSA License Report

[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FLuna-Klatzer%2FKipper.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2FLuna-Klatzer%2FKipper?ref=badge_large)

---
_Source: https://npm.io/package/@kipper/target-ts · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
