{
  "id": 13908438,
  "title": "Modelling Swedish intestate succession in TypeScript",
  "url": "https://urgent.news/2026/10/12/modelling-swedish-intestate-succession-in-typescript",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-12T08:20:22.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/stackedboost/modelling-swedish-intestate-succession-in-typescript-42je"
  },
  "original_language": "en",
  "account": "Sweden's intestate succession law, as outlined in the Inheritance Code (ärvdabalken), dictates how assets are divided when someone dies without a will. This law is concise, fitting on just two printed pages, and follows a fixed order of priority, with equal splits per branch and special cases for spouses. The author has adapted this algorithm into a TypeScript calculator for Swedish users, providing a clear explanation of the law for developers who don't read Swedish. The code is a single pure function, vemArver(input), which takes input and outputs who inherits, without any DOM or I/O operations. The law is structured into three classes of relatives: descendants, parents, and grandparents. Each class inherits only if all classes above it are empty. If a class member is deceased, their descendants or other relatives step into their place, with equal shares being taken. The law also specifies that no other relatives, such as cousins, inherit, and if no heirs are found, the estate goes to Allmänna arvsfonden, the state inheritance fund.",
  "summary": "When someone in Sweden dies without a will, the Inheritance Code ( ärvdabalken , SFS 1958:637) decides who gets what. The rules fit on two printed pages. They are also a small, well-defined algorithm: a walk over a family tree with a fixed priority order, equal splits per branch, and a couple of special cases for spouses. I wrote that algorithm in TypeScript for a free calculator that answers…",
  "key_points": [
    "Sweden's intestate succession law is outlined in the Inheritance Code (ärvdabalken)",
    "TypeScript calculator adapts this algorithm for Swedish users",
    "Pure function vemArver(input) determines inheritance without DOM or I/O"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}