Skip to content

Commit

Permalink
fix(fff): ⏪️ change interface back to type
Browse files Browse the repository at this point in the history
  • Loading branch information
kwaa committed Jun 28, 2023
1 parent ba17bb4 commit 2e15730
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
1 change: 0 additions & 1 deletion docs/version/1.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ title: 'Version 1.1'
## Overview

- Improve:
- Exporting types as interface
- [DateTime](#datetime) no longer supports number

## Base
Expand Down
18 changes: 9 additions & 9 deletions packages/fff-flavored-frontmatter/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Object Image
* @public
*/
export interface FFFImage extends Partial<HTMLImageElement> {
export type FFFImage = Partial<HTMLImageElement> & {
sources?: Partial<HTMLSourceElement>[]
figcaption?: string
}
Expand All @@ -13,23 +13,23 @@ export interface FFFImage extends Partial<HTMLImageElement> {
* Object Audio
* @public
*/
export interface FFFAudio extends Partial<HTMLAudioElement> {
export type FFFAudio = Partial<HTMLAudioElement> & {
sources?: Partial<HTMLSourceElement>[]
}

/**
* Object Video
* @public
*/
export interface FFFVideo extends Partial<HTMLVideoElement> {
export type FFFVideo = Partial<HTMLVideoElement> & {
sources?: Partial<HTMLSourceElement>[]
}

/**
* Author
* @public
*/
export interface FFFAuthor {
export type FFFAuthor = {
/** the author's name. */
name?: string
/** the URL of a site owned by the author. */
Expand All @@ -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. */
Expand All @@ -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. */
Expand All @@ -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. */
Expand All @@ -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. */
Expand All @@ -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. */
Expand Down

0 comments on commit 2e15730

Please sign in to comment.