Tag

addition

0 views collected around this technical thread.

Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Feb 8, 2022 · Frontend Development

Implementing a Type-Level Addition Calculator in TypeScript

This article demonstrates how to build a type-level addition calculator in TypeScript by defining numeric string types, aligning decimal points, using tuple manipulation, and creating a mapping table to perform digit‑wise addition with carry handling, showcasing advanced type‑system techniques.

Advanced TypesFrontendTypeScript
0 likes · 44 min read
Implementing a Type-Level Addition Calculator in TypeScript
ByteFE
ByteFE
Oct 19, 2021 · Frontend Development

TypeScript Type‑Level Implementation of Large Integer Addition

This article explains how to perform high‑precision addition of arbitrarily large numbers entirely at compile time using TypeScript's type system, converting strings to digit arrays, adding digits with lookup tables, handling carries, and finally converting the result back to a string.

Generic TypesTypeScriptaddition
0 likes · 9 min read
TypeScript Type‑Level Implementation of Large Integer Addition