10 Matching Annotations
  1. Aug 2021
    1. The above works great. However, the problem comes when I want to use literal types for my legal values. In my code, I want to do that so I can make sure I define a "handler" for every legal value: const legalValues = <const>["a", "b", "c"]; // later on... // Because legalValues entries are literal types, // I get a compiler error if I forget to define any behaviors const behaviors: { [K in typeof legalValues[number]]: any } = { a: something, b: somethingElse, c: anotherThing };
  2. Jun 2021
  3. Mar 2021
    1. Mutually exclusive categories can be beneficial. If categories appear several places, it's called cross-listing or polyhierarchical. The hierarchy will lose its value if cross-listing appears too often. Cross-listing often appears when working with ambiguous categories that fits more than one place.
  4. en.wikipedia.org en.wikipedia.org
    1. RPython puts some constraints on the Python language such that a variable's type can be inferred at compile time.
  5. Feb 2021
  6. Sep 2020