From 2e15730957e1ef38c037430f031776e29841cf4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=97=8D+85CD?= <50108258+kwaa@users.noreply.github.com> Date: Wed, 28 Jun 2023 16:40:19 +0800 Subject: [PATCH] =?UTF-8?q?fix(fff):=20=E2=8F=AA=EF=B8=8F=20change=20inter?= =?UTF-8?q?face=20back=20to=20type?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/version/1.1.md | 1 - packages/fff-flavored-frontmatter/src/types.ts | 18 +++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/docs/version/1.1.md b/docs/version/1.1.md index 22cc3337..156943bf 100644 --- a/docs/version/1.1.md +++ b/docs/version/1.1.md @@ -9,7 +9,6 @@ title: 'Version 1.1' ## Overview - Improve: - - Exporting types as interface - [DateTime](#datetime) no longer supports number ## Base diff --git a/packages/fff-flavored-frontmatter/src/types.ts b/packages/fff-flavored-frontmatter/src/types.ts index a3dbc205..bfc7f5f3 100644 --- a/packages/fff-flavored-frontmatter/src/types.ts +++ b/packages/fff-flavored-frontmatter/src/types.ts @@ -4,7 +4,7 @@ * Object Image * @public */ -export interface FFFImage extends Partial { +export type FFFImage = Partial & { sources?: Partial[] figcaption?: string } @@ -13,7 +13,7 @@ export interface FFFImage extends Partial { * Object Audio * @public */ -export interface FFFAudio extends Partial { +export type FFFAudio = Partial & { sources?: Partial[] } @@ -21,7 +21,7 @@ export interface FFFAudio extends Partial { * Object Video * @public */ -export interface FFFVideo extends Partial { +export type FFFVideo = Partial & { sources?: Partial[] } @@ -29,7 +29,7 @@ export interface FFFVideo extends Partial { * Author * @public */ -export interface FFFAuthor { +export type FFFAuthor = { /** the author's name. */ name?: string /** the URL of a site owned by the author. */ @@ -42,7 +42,7 @@ export interface FFFAuthor { * Base Variables * @public */ -export interface FFFBase { +export type FFFBase = { /** the title of article, non-article posts may omit titles. */ title?: string /** plain text sentence or two describing the post. */ @@ -59,7 +59,7 @@ export interface FFFBase { * DateTime Vaeriables * @public */ -export interface FFFDateTime { +export type FFFDateTime = { /** the created date of the post. */ created?: string /** the updated date of the post. */ @@ -76,7 +76,7 @@ export interface FFFDateTime { * Media Variables * @public */ -export interface FFFMedia { +export type FFFMedia = { /** the main image for article or photo post. */ image?: string | FFFImage /** the image for multi-photo post. */ @@ -93,7 +93,7 @@ export interface FFFMedia { * Mention Variables * @public */ -export interface FFFMention { +export type FFFMention = { /** indicates this post is a bookmark of another URL. */ bookmark_of?: string /** the URL which the post is considered a "like" (favorite, star) of. */ @@ -108,7 +108,7 @@ export interface FFFMention { * Extra Variables * @public */ -export interface FFFExtra { +export type FFFExtra = { /** specifies one or more post authors. */ authors?: FFFAuthor[] /** the primary language for the post. */