Beehaw
  • Communities
  • Create Post
  • search
    Search
  • Login
  • Sign Up
Gollum ( genfood@feddit.org )  to Programmer Humor@programming.dev · 11 months ago

This is literally me

feddit.org

message-square
18
link
fedilink
239

This is literally me

feddit.org

Gollum ( genfood@feddit.org )  to Programmer Humor@programming.dev · 11 months ago
message-square
18
link
fedilink
  • bleistift2 ( bleistift2@sopuli.xyz ) 
    link
    fedilink
    English
    arrow-up
    90
    ·
    11 months ago
    1. Rename every file from *.js to *.ts
    2. Set the compiler options
      {
        "checkJs": false,
        "allowJs": true,
        "noEmitOnError": false, // so the compiler compiles code it can’t prove right yet. Reset this after you’re done migrating
      }
      
    3. Install type packages for dependencies that don’t bring type information out of the box, for instance
      npm i -D @types/d3
      
    4. Add // @ts-nocheck to the beginning of every file.
    5. Go through your project file by file, remove the comment from (4) and add types until the errors are gone. And probably fix some errors along the way.

    Abbreviated from “TypeScript Cookbook” by Stefan Baumgartner.

    • towerful ( towerful@programming.dev ) 
      link
      fedilink
      arrow-up
      31
      ·
      11 months ago

      I was gonna say “salt bae some any wherever there are squiggles”.
      Your way seems more… Methodical

    • [object Object] ( panda_abyss@lemmy.ca ) 
      link
      fedilink
      arrow-up
      23
      ·
      11 months ago

      Some LLM is going to be trained on your idea and enact high levels of malicious compliance.

      • bleistift2 ( bleistift2@sopuli.xyz ) 
        link
        fedilink
        English
        arrow-up
        21
        ·
        11 months ago

        Not my idea. I literally cited the source.

      • TachyonTele ( TachyonTele@piefed.social ) 
        link
        fedilink
        English
        arrow-up
        6
        ·
        11 months ago

        It’s a war of attrition.

    • deadbeef79000 ( deadbeef79000@lemmy.nz ) 
      link
      fedilink
      arrow-up
      13
      ·
      11 months ago

      Just stop at 4.

      Ta da! It’s typescript.

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
    • If the mod doesn’t find it funny, you’re banned. Ha-ha!.. For real: do not use the community for “statements”. There are other places for such content. Keep it chill and funny.
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 483 users / day
  • 1.49K users / week
  • 3.33K users / month
  • 7.28K users / 6 months
  • 463 local subscribers
  • 33.6K subscribers
  • 1.53K Posts
  • 25.2K Comments
  • Modlog
  • mods:
  • Feyter ( Feyter@programming.dev ) 
  • adr1an ( anzo@programming.dev ) 
  • BurningTurtle ( BurningTurtle@programming.dev ) 
  • Pierre-Yves Lapersonne ( pylapp@programming.dev ) 
  • BE: 0.19.15
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code