TypeScript

Files
.ts .mts .cts .tsx
Formats as
Prettier
Lints
Every rule that reads its code
In ur.toml
[format.typescript]

Formatted

cart.ts, as written
// What a cart costs.
interface Item {name:string,price:number,quantity:number}
export function subtotal(items:Item[]):number{return items.reduce((sum,item)=>sum+item.price*item.quantity,0)}
ur format --style prettier cart.ts
// What a cart costs.
interface Item {
  name: string;
  price: number;
  quantity: number;
}
export function subtotal(items: Item[]): number {
  return items.reduce((sum, item) => sum + item.price * item.quantity, 0);
}

Try it in the playground →

Versions

Ur reads TypeScript as the profiles below name it. Name the versions a project targets in target; without it, Ur reads typescript-5.9.

ProfileDialect
typescript-5.9TypeScript
typescript-5.9-experimental-decoratorsTypeScript
typescript-5.9-jsxTypeScript
typescript-5.9-experimental-decorators-jsxTypeScript