@sanity/tsdoc
Version:
Generate API reference docs from TypeScript projects and store in a Sanity-friendly JSON format. Render a static frontend, or as React components.
20 lines (17 loc) • 423 B
text/typescript
import {defineField, defineType} from 'sanity'
export const apiIndexSignatureType = defineType({
type: 'object',
name: 'api.indexSignature',
title: 'Index signature',
fields: [
defineField({
type: 'api.releaseTag',
name: 'releaseTag',
title: 'Release tag',
}),
],
preview: {
select: {title: 'name'},
prepare: ({title}: any) => ({title, subtitle: 'Index signature'}),
},
})