Skip to content

Type

tsx
import { createRoot, Type } from '@kubb/react'

const root = createRoot()

const Component = () => {
  return (
    <Type name="Data">
      string
    </Type>
  )
}

root.render(<Component />)

return root.output
typescript
type Data = string

API

PropertyDescriptionTypeDefault
nameName of the type, this needs to start with a capital letter.string-
exportDoes this type need to be exported.boolean | undefined-
JSDocOptions for JSdocsJSDoc | undefined-
childrenKubbNode | undefined-

Released under the MIT License.