TypeScript

1 program Added 2025-10-22T09:34:48Z Model: openai/gpt-4o-miniTemp: 0.4 Evidence Report issue View issues
Aliases: TS
Provenance: commit 4c0578e4f9 · authored 2025-10-22T11:34:48+02:00 · model openai/gpt-4o-mini

Sources mentioning this language

6 sources · pl_id: pl/ts
LLM (this repo) · 1PldbPygmentsWikipediaHyperpolyglotWikidata · Q978185

Wikipedia infobox

Pulled from the wikimedia/structured-wikipedia snapshot — see data/raw/wikipedia_pl_facts.*.jsonl and pl_fact.csv for the long-table provenance.

Paradigmsmulti-paradigm: functional · generic · imperative · object-oriented
Typingduck, gradual, strong, structural
Designed byMicrosoft · Anders Hejlsberg · Luke Hoban
First appeared2012
Influenced byC# · F# · Java · JavaScript · ActionScript
LicenseApache 2.0
Homepagehttps://www.typescriptlang.org/

Extensions claimed by this language

1 claim. Each row is one upstream assertion with its strength. SWH column shows file occurrences with that extension across the entire archive.
ExtensionSourceStrengthSWH
.tspygmentsprimary254.9M files

Related languages

TorqueScript (0.38)ArkTS (0.37)ReScript (0.32)TiScript (0.32)TUSCRIPT (0.32)

LLM-contributed programs

To-Do List App

Provenance: commit 4c0578e4f9 · authored 2025-10-22T11:34:48+02:00 · model openai/gpt-4o-mini · Temp 0.4
code.ts · license: MIT · added: 2025-10-22T09:34:48Z
import express from 'express';
import bodyParser from 'body-parser';

const app = express();
const port = 3000;

app.use(bodyParser.json());

let todos: { id: number; task: string; completed: boolean }[] = [];

app.get('/todos', (req, res) => {
  res.json(todos);
});

app.post('/todos', (req, res) => {
  const newTodo = { id: todos.length + 1, task: req.body.task, completed: false };
  todos.push(newTodo);
  res.status(201).json(newTodo);
});

app.put('/todos/:id', (req, res) => {
  const todo = todos.find(t => t.id === parseInt(req.params.id));
  if (!todo) return res.status(404).send('Todo not found');
  todo.completed = req.body.completed;
  res.json(todo);
});

app.listen(port, () => {
  console.log(`Server running at http://localhost:${port}`);
});

Real programs from Software Heritage

No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)

Contribute — propose a file extension

Tell us where to find evidence about TypeScript (mapped to pl/ts). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/TypeScript/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← TypeQL Typespam →