Skip to content

Commit

Permalink
fix: correct Object type (#1723)
Browse files Browse the repository at this point in the history
  • Loading branch information
veu committed Feb 28, 2023
1 parent ad808d8 commit 71e2ba2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/types/entry.ts
Expand Up @@ -7,14 +7,13 @@ import { Metadata } from './metadata'
import { FieldsType } from './query/util'
import { EntitySys } from './sys'
import { ChainModifiers } from '../utils/client-helpers'
import { JsonArray, JsonObject } from 'type-fest'

export interface EntrySys extends EntitySys {
contentType: { sys: ContentTypeLink }
type: 'Entry'
}

type Json = string | number | boolean | null | { [key: string]: Json } | Json[]

export declare namespace EntryFields {
type Symbol = string
type Text = string
Expand All @@ -32,7 +31,7 @@ export declare namespace EntryFields {
type AssetLink = Asset
type Link<Fields extends FieldsType> = AssetLink | EntryLink<Fields>
type Array<Item extends EntryFields.Symbol | AssetLink | EntryLink<FieldsType>> = Item[]
type Object<Data extends Json = Json> = Data
type Object<Data extends JsonObject | JsonArray | null = JsonObject | JsonArray | null> = Data
type RichText = RichTextDocument
}

Expand Down

0 comments on commit 71e2ba2

Please sign in to comment.