# [TypeScript](https://www.typescriptlang.org)'s Type System, 78 bytes

```lang-typescript
//@ts-ignore
type M<A,B,T=[]>=A extends[...B,...infer I]?M<I,B,[...T,1]>:[T,A]
```

[Try it at the TypeScript Playground!](https://www.typescriptlang.org/play?#code/PTAEBEEsDdIZ0gewHagIbICagEoFMBbNSLPAJ1BNABUBPABzwGUBjMyegFxobzlAC0oAOwAOUACNanPgCgQoAJLAA8pX5UArsjRlas+cAACnOAMgBzZIjJ5ZnXqACyAHgCCAGgBCH6gF4AbQBdAD4-N1A8AA8ZLDgAgDoknySEkgAzciUggH5XRW8PRKTqDwBGUIAuANK3IIMFADFERBkKMGo+bhY0ODl7R3A8FkgiABtqRABVHT0XWVAaADlNAkiYvDjQZFWJcg8F0Ajo2Mx+MuDQP1Bg2RCr7d2sk82z5dXDnNAL+sXKo4CACIxpsLJwABaAoLrU78agrAifI6Hf5DEbjSYzXS0Fzw1YeG6pTzfUIAbgMDkYNC680Wxw2Wx2BD2ZAOiy8MNe-CZLLZoAAGpytgEMLRggTRcFoddXGjRmgJtNZji3CECXKMUrsS4vCEQncHgBvUCYGDwJDIf78gIABiCQJByDBkKCpNAtiIJEw5CtAQqDtBEKhoAAvuSBlTOnBOGUHlHOC4ACwEgBM+oUiwAejkI3hqdGU3GaQA2RM2gnFkLkjOgbO5-OcADMRejLgAnG2CaJ02AsznZEA)

This submission is a generic type taking in two numbers in unary and outputting a tuple of two unary numbers, the first being the division and the second the remainder.

Explanation:

```lang-typescript
//@ts-ignore           // ignore any compiler errors in this type
type M<
  A,                   // A is the numerator
  B,                   // B is the denominator
  T = []               // T is the # of times recursed (division result)
> =
  A extends [...B,     // if B fits in A:
    ...infer I         //   set I to the difference (A - B)
  ] ? M<               //   recurse with:
        I,             //     I as the numerator
        B,             //     B as the denominator
        [...T, 1]      //     T with 1 appended (i.e. increment)
      >
    : [T, A]           // otherwise return [T, A]
```

This uses tail recursion to increase the maximum recursion depth from 50 to 999.