algolia / youtube-captions-scraper

Fetch youtube user submitted or fallback to auto-generated captions
249 stars 67 forks source link

Could not find a declaration #16

Closed aramis-it closed 2 years ago

aramis-it commented 2 years ago

Could not find a declaration file for module 'youtube-captions-scraper'

Haroenv commented 2 years ago

Yes, this library is not written in TypeScript, although it only has one export:

export async function getSubtitles(options: {
  videoID: string,
  lang?: 'en' | 'de' | 'fr',
}): Array<{start: string, dur: string, text: string}> {}

You can add the declaration to your own project, see the typescript documentation for that here: https://www.typescriptlang.org/docs/handbook/2/type-declarations.html#your-own-definitions