Microblog

You know how some dogs bark at people when they come over?

My dog barks at people when they leave.

COME BACK FRIEND WHY ARE YOU LEAVING I DIDN’T SAY YOU COULD LEAVE HOW DARE YOU WHO DO YOU THINK YOU ARE

social.lol/@bw/111416325308794374

@tomfinley@wptoots.social Yeah WordPress itself is impressively backward compatible. Unfortunately PHP isn’t so much. I’ve been bit by breaking changes in PHP a number of times. Luckily, WordPress is actively developed and on top of things!

social.lol/@bw/111344605250778679

How does Slack not have syntax highlighting on code blocks? It's supposed to be *the* chat application for work. Discord’s code blocks are way better.

(Someone correct me if Slack does have this feature and I'm just using it wrong. But including a language abbreviation after the opening code fence doesn't seem to do it.)

social.lol/@bw/111333489165075385

Continuing in my quest for nice Vue DX without build steps… I’ve learned two things:

- Even tho I’m using a downloaded ESM browser version, I can still install the Vue npm package and refer to its types from JSDoc.

- The composition API is much easier to type than the options API.

social.lol/@bw/111313172895016528

Vue devs, help!

Trying to get type support in regular JS using Vue’s ESM browser build.

Inside of the hasName computed value, VSCode thinks `this` refers to the `computed` object rather than the Vue app. What can I do here?

const test = createApp({
  data: () => ({
    name: 'Testing'
  }),

  computed: {
    hasName() {
      return !!this.name;
    }
  }
});

social.lol/@bw/111309530389909270

Another piece of nice-vue-but-no-build-step is using ES modules. That let’s me separate out components into their own files.

Still exploring type support, but adding a jsconfig.json with checkJs turned on is the first step. It kinda misinterprets things when using Vue’s options API, so it might be that the composition API is better for this use case.

social.lol/@bw/111308874619186766