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

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

Conversation

Notices

  1. Embed this notice
    Aral Balkan (aral@mastodon.ar.al)'s status on Thursday, 29-Aug-2024 01:26:11 JST Aral Balkan Aral Balkan

    Almost another year has passed and it’s still not possible to use JSDoc and have the TypeScript LSP understand when you’re referring to a class and when you’re referring to an instance…

    *sigh*

    https://github.com/jsdoc/jsdoc/issues/1349#issuecomment-1725400751

    #JSDoc #TypeScript #web #dev

    In conversation Thursday, 29-Aug-2024 01:26:11 JST from mastodon.ar.al permalink
    • Embed this notice
      Aral Balkan (aral@mastodon.ar.al)'s status on Saturday, 31-Aug-2024 00:48:32 JST Aral Balkan Aral Balkan
      in reply to
      • Bart Louwers

      @bart I explained my use case in the linked comment. I don’t see how the use of @template can fix that. (It’s possible I’m missing something.)

      In conversation Saturday, 31-Aug-2024 00:48:32 JST permalink
    • Embed this notice
      Bart Louwers (bart@floss.social)'s status on Saturday, 31-Aug-2024 00:48:33 JST Bart Louwers Bart Louwers
      in reply to

      @aral I don't understand.

      ```js
      class Base {
      bla() {
      console.log("base");
      }
      };

      class Derived extends Base {
      bla() {
      console.log("derived");
      }
      };

      /**
      * @template {Base} T
      * @param {T} base
      */
      function fun(base) {
      base.bla();
      }

      fun(new Base());
      fun(new Derived());

      /**
      *
      * @param {typeof Base} cls
      */
      function makeBase(cls) {
      return new cls();
      }

      makeBase(Base).bla();
      makeBase(Derived).bla();
      ```

      In conversation Saturday, 31-Aug-2024 00:48:33 JST permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • 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.