From b3ba38c91c8059f13834a25e45b565fde2771a5c Mon Sep 17 00:00:00 2001 From: alikia2x Date: Sat, 9 Nov 2024 23:21:12 +0800 Subject: [PATCH] ref: type --- packages/core/lyrics/lrc/type.d.ts | 10 ---------- packages/core/lyrics/type.d.ts | 21 +++++++++------------ 2 files changed, 9 insertions(+), 22 deletions(-) diff --git a/packages/core/lyrics/lrc/type.d.ts b/packages/core/lyrics/lrc/type.d.ts index cf3a8e5..a9bd7b7 100644 --- a/packages/core/lyrics/lrc/type.d.ts +++ b/packages/core/lyrics/lrc/type.d.ts @@ -1,13 +1,3 @@ -import type { ScriptWordsItem } from "../type"; - -export interface ParserScriptItem { - start: number; - text: string; - words?: ScriptWordsItem[]; - translation?: string; - singer?: string; -} - export interface IDTag { [key: string]: string; } \ No newline at end of file diff --git a/packages/core/lyrics/type.d.ts b/packages/core/lyrics/type.d.ts index 647dae2..cc6953e 100644 --- a/packages/core/lyrics/type.d.ts +++ b/packages/core/lyrics/type.d.ts @@ -1,8 +1,11 @@ -import type { ParserScriptItem } from "./lrc/type"; - -export interface ScriptItem extends ParserScriptItem { +export interface ScriptItem{ end: number; chorus?: string; + start: number; + text: string; + words?: LyricWord[]; + translation?: string; + singer?: string; } export interface LyricWord { @@ -12,7 +15,7 @@ export interface LyricWord { emptyBeat?: number; } -export interface LrcMetaData { +export interface LyricMetadata { ar?: string; ti?: string; al?: string; @@ -23,14 +26,8 @@ export interface LrcMetaData { ve?: string; } -export interface ParsedLrc extends LrcMetaData { - scripts?: ParserScriptItem[]; - - [key: string]: any; -} - -export interface LrcJsonData extends LrcMetaData { - scripts?: ScriptItem[]; +export interface LyricData extends LyricMetadata { +scripts?: ScriptItem[]; [key: string]: any; } \ No newline at end of file