@types/subtitle
TypeScript icon, indicating that this package has built-in type declarations

2.0.6 • Public • Published

Installation

npm install --save @types/subtitle

Summary

This package contains type definitions for subtitle (https://github.com/gsantiago/subtitle.js#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/subtitle.

index.d.ts

export interface subTitleType {
    start: number | string;
    end: number | string;
    text: string;
    setting?: string | undefined;
}

export function parse(srtOrVtt: string): subTitleType[];
export function stringify(captions: readonly subTitleType[]): string;
export function stringifyVtt(captions: readonly subTitleType[]): string;
export function resync(captions: readonly subTitleType[], time: number): subTitleType[];
export function toMS(timestamp: string): number;
export function toSrtTime(timestamp: number): string;
export function toVttTime(timestamp: number): string;

Additional Details

  • Last updated: Mon, 20 Nov 2023 23:36:24 GMT
  • Dependencies: none

Credits

These definitions were written by Low Jeng Lam.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/subtitle

Weekly Downloads

1,261

Version

2.0.6

License

MIT

Unpacked Size

3.71 kB

Total Files

5

Last publish

Collaborators

  • types