sinclairzx81/typebox-workbench

Missing $id for File

wenerme opened this issue · 1 comments

input

/**
 * @$id File
 * @title 文件
 */
export interface FileObject  {
  
}


/**
 * @$id: FileObject
 */
export interface FileObject2  {
  
}

/**
 * @$id FileObject
 */
export interface FileObject3  {
  
}

output

import { Type, Static } from '@sinclair/typebox'

export type FileObject = Static<typeof FileObject>
export const FileObject = Type.Object({}, { title: '文件' })

export type FileObject2 = Static<typeof FileObject2>
export const FileObject2 = Type.Object({}, { '$id:': 'FileObject' })

export type FileObject3 = Static<typeof FileObject3>
export const FileObject3 = Type.Object({}, { $id: 'FileObject' })

@wenerme Hiya,

Have published a quick fix for this (although a better JsDoc parser might be in order). Have also re-added the return type instantiations for Composite as TypeBox 0.32.9 has just been published with Composite optimizations.

Will close off this issue for now, but if you run into any issues, feel free to ping on this thread.
Cheers
S