Open
Description
Specifying
export default defineType({
name: "advisoryNote",
title: "Advisory Note",
type: "document",
icon: WarningOutlineIcon,
options: {
singleton: true,
},
now seems to conflict with some core Sanity types:
sanity/schemas/singleton/advisoryNote.ts:11:5 - error TS2353: Object literal may only specify known properties, and 'singleton' does not exist in type 'BaseSchemaTypeOptions'.
11 singleton: true,
~~~~~~~~~
and
The expected type comes from property 'options' which is declared here on type '{ type: "document"; name: "advisoryNote"; } & Omit<DocumentDefinition, "preview"> & { preview?: PreviewConfig<Record<string, string>, Record<never, any>> | undefined; }'
sanity/schemas/singleton/settings.ts:11:5 - error TS2353: Object literal may only specify known properties, and 'singleton' does not exist in type 'BaseSchemaTypeOptions'.
11 singleton: true,
~~~~~~~~~
Should we stop using this package and perhaps do something like this ourselves (a bit old, but seems to be for Sanity v3, however) https://www.sanity.io/guides/singleton-document
Metadata
Metadata
Assignees
Labels
No labels