@@ -6,11 +6,6 @@ import type {
66 ResolvedMetadataWithURLs ,
77} from "./metadata-interface" ;
88
9- // Simplify the type of the title property in the opengraph type
10- export type SimplifyTitleInUnion < T > = T extends { title ?: unknown }
11- ? Omit < T , "title" > & { title ?: string }
12- : T ;
13-
149export type InputMetadata = {
1510 /**
1611 * The character set of the document.
@@ -358,7 +353,7 @@ export type InputMetadata = {
358353 *
359354 * @see https://ogp.me/
360355 */
361- openGraph ?: SimplifyTitleInUnion < NextMetadata [ "openGraph" ] > ;
356+ openGraph ?: NextMetadata [ "openGraph" ] ;
362357 /**
363358 * The Twitter metadata for the document.
364359 *
@@ -381,7 +376,7 @@ export type InputMetadata = {
381376 * // <meta name="twitter:image" content="https://example.com/og.png" />
382377 * ```
383378 */
384- twitter ?: SimplifyTitleInUnion < NextMetadata [ "twitter" ] > ;
379+ twitter ?: NextMetadata [ "twitter" ] ;
385380 /**
386381 * The Facebook AppLinks metadata for the document.
387382 *
@@ -453,8 +448,8 @@ export type NormalizedMetadata = {
453448 formatDetection : ResolvedMetadata [ "formatDetection" ] ;
454449 verification : ResolvedMetadata [ "verification" ] ;
455450 appleWebApp : ResolvedMetadata [ "appleWebApp" ] ;
456- openGraph : SimplifyTitleInUnion < ResolvedMetadata [ "openGraph" ] > ;
457- twitter : SimplifyTitleInUnion < ResolvedMetadata [ "twitter" ] > ;
451+ openGraph : ResolvedMetadata [ "openGraph" ] ;
452+ twitter : ResolvedMetadata [ "twitter" ] ;
458453 appLinks : ResolvedMetadataWithURLs [ "appLinks" ] ;
459454 icons : ResolvedMetadata [ "icons" ] ;
460455} ;
0 commit comments