mirror of
https://github.com/vercel/commerce.git
synced 2025-05-15 14:06:59 +00:00
12 lines
311 B
TypeScript
12 lines
311 B
TypeScript
import {ConfigContext} from 'sanity'
|
|
import {StructureBuilder} from 'sanity/desk'
|
|
|
|
/**
|
|
* Helper for creating and typing composable desk structure parts.
|
|
*/
|
|
export default function defineStructure<StructureType>(
|
|
factory: (S: StructureBuilder, context: ConfigContext) => StructureType
|
|
) {
|
|
return factory
|
|
}
|