GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Embed Notice

HTML Code

Corresponding Notice

  1. Embed this notice
    Axel Rauschmayer (rauschma@fosstodon.org)'s status on Saturday, 09-Mar-2024 10:40:25 JSTAxel RauschmayerAxel Rauschmayer

    1/ I love #TypeScript’s discriminated unions: https://exploringjs.com/tackling-ts/ch_special-values.html#discriminated-unions

    Alas, I often end up switching to classes:

    A. The discriminant is not very sticky:
    – There is no refactoring for renaming it.
    – TS cannot infer the type of an object via a discriminant (only narrow it). In contrast to: new MyClass()

    B. Classes provide locations for initialization code and operations. I could put each DU in its own module but that is often too fine-grained for my taste. Future: submodules?

    In conversationSaturday, 09-Mar-2024 10:40:25 JST from fosstodon.orgpermalink

    Attachments

    1. No result found on File_thumbnail lookup.
      Adding special values to types • Tackling TypeScript
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.