DEV Community

c5n8
c5n8

Posted on

Natural Vue defineProps

What if we have something like this?

const props = defineProps(
  /**
   * @param {{
   *   foo: boolean,
   *   bar: number,
   * }} props
   */
  (
    props = {
      foo: false,
      bar: 0,
    }
  ) => props
)
Enter fullscreen mode Exit fullscreen mode

in typescript

const props = defineProps(
  (
    props: {
      foo: boolean,
      bar: number,
    } = {
      foo: false,
      bar: 0,
    }
  ) => props
)
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay