@aim-packages/subtitle 0.0.12 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.d.ts +7 -5
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -40,7 +40,7 @@
40
40
  space?: 0 | 1; // 存在多余空格 (Whether there are extra spaces)
41
41
  *
42
42
  */
43
- declare interface AimSegments {
43
+ export declare interface AimSegments {
44
44
  st: string;
45
45
  et: string;
46
46
  text: string;
@@ -137,7 +137,7 @@ export declare namespace filter {
137
137
  */
138
138
  declare function formatTime(seconds: number): string;
139
139
 
140
- declare type LanguageCode = "auto" | "none" | "zh" | "zh_cn" | "zh_tw" | "yue" | "en" | "ja" | "ko" | "fr" | "es" | "ru" | "de" | "it" | "tr" | "pt" | "vi" | "id" | "th" | "ms" | "ar" | "hi" | "ro" | "ug" | "uz" | "kk" | "az" | "ky" | "fa" | "tg";
140
+ export declare type LanguageCode = "auto" | "none" | "zh" | "zh_cn" | "zh_tw" | "yue" | "en" | "ja" | "ko" | "fr" | "es" | "ru" | "de" | "it" | "tr" | "pt" | "vi" | "id" | "th" | "ms" | "ar" | "hi" | "ro" | "ug" | "uz" | "kk" | "az" | "ky" | "fa" | "tg";
141
141
 
142
142
  /**
143
143
  * 将语言代码转换为名称
@@ -172,7 +172,7 @@ declare interface OpenAIResult {
172
172
 
173
173
  declare function openaiToAimSegments(json: OpenAIResult): Promise<AimSegments[]>;
174
174
 
175
- declare interface OptimizationOptions {
175
+ export declare interface OptimizationOptions {
176
176
  emt: boolean;
177
177
  ep: boolean;
178
178
  zf: boolean;
@@ -258,6 +258,8 @@ declare type ParserOptions<S, P, E> = {
258
258
  onEnd?: ParseCallback<E>;
259
259
  };
260
260
 
261
+ export declare type PartialByKey<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
262
+
261
263
  declare class RepeatCheck {
262
264
  threshold: number;
263
265
  hit: number;
@@ -275,9 +277,9 @@ declare interface RepeatCheckOption {
275
277
  onHit?: (segment: AimSegments[]) => void;
276
278
  }
277
279
 
278
- declare type RequiredByKey<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
280
+ export declare type RequiredByKey<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
279
281
 
280
- declare type Segment = {
282
+ export declare type Segment = {
281
283
  start: number;
282
284
  end: number;
283
285
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aim-packages/subtitle",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "main": "dist/index.cjs.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {