# What Programming Languages Are Used in the Corsair Repository?

> Discover the programming languages powering the Corsair repository. Explore the primary use of TypeScript and JavaScript for configuration, scripts, and tooling.

- Repository: [corsairdev/corsair](https://github.com/corsairdev/corsair)
- Tags: getting-started
- Published: 2026-09-01

---

**The Corsair codebase is written primarily in TypeScript, with JavaScript used for configuration files, scripts, and tooling.**

Corsair is an open-source integration platform maintained by `corsairdev`. According to the repository source code, all executable logic is implemented in TypeScript and JavaScript, with JSON and YAML serving as supporting configuration formats. This language choice reflects a modern Node.js development approach that prioritizes type safety for core functionality while keeping tooling lightweight.

## TypeScript as the Core Language

**TypeScript** dominates the Corsair repository. The language is used for all integration clients, API endpoints, and plugin implementations.

Key TypeScript files include:

- [[`packages/bitbucket/client.ts`](https://github.com/corsairdev/corsair/blob/main/packages/bitbucket/client.ts)](https://github.com/corsairdev/corsair/blob/main/packages/bitbucket/client.ts) – core integration client for BitBucket operations
- [[`packages/alchemy/endpoints/token.ts`](https://github.com/corsairdev/corsair/blob/main/packages/alchemy/endpoints/token.ts)](https://github.com/corsairdev/corsair/blob/main/packages/alchemy/endpoints/token.ts) – API endpoint definitions for token management

The repository structure follows a monorepo pattern where each package under `packages/` is authored in `.ts` or `.tsx` files. TypeScript's static typing enables consistent API contracts across integrations and catches errors at compile time rather than runtime.

## JavaScript for Tooling and Scripts

**JavaScript** appears in auxiliary scripts and build utilities where the overhead of TypeScript compilation is unnecessary.

Representative JavaScript files:

- [[`scripts/generate-plugin.ts`](https://github.com/corsairdev/corsair/blob/main/scripts/generate-plugin.ts)](https://github.com/corsairdev/corsair/blob/main/scripts/generate-plugin.ts) – CLI generator for scaffolding new plugins
- [`scripts/publish-order.mjs`](https://github.com/corsairdev/corsair/blob/main/scripts/publish-order.mjs) – publishing utility for release orchestration

The `.mjs` extension in `publish-order.mjs` indicates **ECMAScript Module** usage, enabling modern `import`/`export` syntax without additional transpilation.

## Configuration and Data Formats

While not programming languages, the repository relies on standard markup formats for project configuration:

| Format | Purpose | Example Files |
|--------|---------|---------------|
| **JSON** | Package manifests, TypeScript configuration | [[`package.json`](https://github.com/corsairdev/corsair/blob/main/package.json)](https://github.com/corsairdev/corsair/blob/main/package.json), [[`tsconfig.json`](https://github.com/corsairdev/corsair/blob/main/tsconfig.json)](https://github.com/corsairdev/corsair/blob/main/tsconfig.json) |
| **YAML** | CI/CD pipeline definitions | [[`.github/workflows/pr-checks.yml`](https://github.com/corsairdev/corsair/blob/main/.github/workflows/pr-checks.yml)](https://github.com/corsairdev/corsair/blob/main/.github/workflows/pr-checks.yml) |

These files define dependencies, compiler options, and automated testing workflows but contain no executable business logic.

## Language Distribution and Rationale

The Corsair repository's language strategy follows a clear pattern:

- **TypeScript (.ts/.tsx)** – all runtime code, integration logic, and API implementations
- **JavaScript (.js/.mjs)** – build scripts, generators, and configuration utilities
- **JSON/YAML** – declarative configuration only

This division leverages TypeScript's **type safety** for the complex integration layer while avoiding compilation overhead for simple automation scripts. The approach aligns with modern Node.js best practices where TypeScript compiles to JavaScript for execution, but source files remain clearly separated by concern.

## Summary

- **TypeScript** is the primary programming language in Corsair, used for all core integration and API code
- **JavaScript** handles tooling, scripts, and build utilities with both CommonJS and ES Module formats
- **JSON and YAML** serve as configuration formats with no executable logic
- File paths like [`packages/bitbucket/client.ts`](https://github.com/corsairdev/corsair/blob/main/packages/bitbucket/client.ts) and `scripts/publish-order.mjs` demonstrate the clear organizational boundary between typed application code and script utilities

## Frequently Asked Questions

### Is Corsair written entirely in TypeScript?

No, Corsair uses TypeScript for its core integration logic but JavaScript for auxiliary scripts and tooling. Configuration files use JSON and YAML. The repository does not appear to use other programming languages like Python, Go, or Rust based on available source paths.

### Why does Corsair use both TypeScript and JavaScript?

TypeScript provides static typing for complex integration code where API contracts and error prevention matter most. JavaScript suffices for simple build scripts and CLI tools where compilation adds overhead without significant benefit. This hybrid approach balances safety with simplicity.

### What is the .mjs file extension used for in Corsair?

The `.mjs` extension in files like `scripts/publish-order.mjs` explicitly denotes **ECMAScript Modules**, allowing native `import` and `export` syntax without configuring TypeScript or Babel. Node.js treats these files as ES modules regardless of [`package.json`](https://github.com/corsairdev/corsair/blob/main/package.json) settings.

### Where can I find the main TypeScript configuration for Corsair?

The root [[`tsconfig.json`](https://github.com/corsairdev/corsair/blob/main/tsconfig.json)](https://github.com/corsairdev/corsair/blob/main/tsconfig.json) defines compiler options for the entire repository. Individual packages may extend or override these settings with their own [`tsconfig.json`](https://github.com/corsairdev/corsair/blob/main/tsconfig.json) files for specialized build requirements.