fix(api): un-export types used only within their own module (knip gate)
The S3b api.ts split introduced 5 exported-but-never-imported types (PlaylistKind/PlaylistSource, DownloadJobKind, YT internal option/data shapes). The publish gate's knip lane flagged them (my per-step checks ran tsc/eslint/ prettier/vitest but not knip). They're used inside their own modules by the interfaces, so make them local (consumers compare against literals, never name the type).
This commit is contained in:
@@ -159,8 +159,10 @@ export interface FeedResponse {
|
|||||||
// or optional (dead surface). Re-add if a consumer ever needs it.
|
// or optional (dead surface). Re-add if a consumer ever needs it.
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PlaylistKind = "user" | "watch_later";
|
// Not exported: consumers compare `playlist.kind`/`.source` against string literals, they never
|
||||||
export type PlaylistSource = "local" | "youtube";
|
// name these types — keeping them local satisfies the no-unused-exports gate (knip).
|
||||||
|
type PlaylistKind = "user" | "watch_later";
|
||||||
|
type PlaylistSource = "local" | "youtube";
|
||||||
|
|
||||||
export interface Playlist {
|
export interface Playlist {
|
||||||
id: number;
|
id: number;
|
||||||
|
|||||||
@@ -41,7 +41,8 @@ interface DownloadAsset {
|
|||||||
|
|
||||||
export type DownloadStatus = "queued" | "running" | "paused" | "done" | "error" | "canceled";
|
export type DownloadStatus = "queued" | "running" | "paused" | "done" | "error" | "canceled";
|
||||||
// "download" (default) or "edit" (a per-user trim/crop derivative cut from another job).
|
// "download" (default) or "edit" (a per-user trim/crop derivative cut from another job).
|
||||||
export type DownloadJobKind = "download" | "edit";
|
// Local (not exported): consumers compare `job.job_kind` against literals, never name the type.
|
||||||
|
type DownloadJobKind = "download" | "edit";
|
||||||
|
|
||||||
// Phase-2 editor recipe. A single `trim` (one output file) or a `segments` cut-list joined into
|
// Phase-2 editor recipe. A single `trim` (one output file) or a `segments` cut-list joined into
|
||||||
// one file. `accurate` re-encodes for a frame-accurate cut (a crop always re-encodes).
|
// one file. `accurate` re-encodes for a frame-accurate cut (a crop always re-encodes).
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// @types/youtube we declare just the methods/events PlayerModal calls, so tsc flags any new call
|
// @types/youtube we declare just the methods/events PlayerModal calls, so tsc flags any new call
|
||||||
// that isn't covered here. See [[reference-yt-iframe-api-remote-control-map]] for what's driveable.
|
// that isn't covered here. See [[reference-yt-iframe-api-remote-control-map]] for what's driveable.
|
||||||
|
|
||||||
export interface YTVideoData {
|
interface YTVideoData {
|
||||||
title: string;
|
title: string;
|
||||||
author: string;
|
author: string;
|
||||||
video_id?: string;
|
video_id?: string;
|
||||||
@@ -34,7 +34,7 @@ export interface YTPlayerEvent {
|
|||||||
target: YTPlayer;
|
target: YTPlayer;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface YTPlayerOptions {
|
interface YTPlayerOptions {
|
||||||
width?: string | number;
|
width?: string | number;
|
||||||
height?: string | number;
|
height?: string | number;
|
||||||
videoId?: string;
|
videoId?: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user