From the /review-pr baseline (type-design-analyzer):
- VideoInfo understates the real payload (formats/resolution/format_id/extractor/playlist_title/id consumed via
any in logFormats/parseRes/parseCaption) and overstates optionality (webpage_url). Split RawVideoInfo (mirrors yt-dlp) from validated VideoInfo (webpage_url required) built by one parse function; deletes the ! and the anys.
- Callback data protocol is stringly typed and split across produce (
dl:${id}) and parse (regex) sites — add encodeCallback/decodeCallback pair.
- types.ts CallbackQueryContext should narrow to Update.CallbackQueryUpdate<CallbackQuery.DataQuery> (and/or use callbackQuery('data') filter), deleting
(ctx.callbackQuery as any).data.
- LogMessage/NoLog: extract a Log interface; NoLog as standalone null object instead of subclass-with-no-op-overrides.
- memoize key type says
string | false but runtime treats '' as skip-cache — align.
From the /review-pr baseline (type-design-analyzer):
anyin logFormats/parseRes/parseCaption) and overstates optionality (webpage_url). Split RawVideoInfo (mirrors yt-dlp) from validated VideoInfo (webpage_url required) built by one parse function; deletes the!and theanys.dl:${id}) and parse (regex) sites — add encodeCallback/decodeCallback pair.(ctx.callbackQuery as any).data.string | falsebut runtime treats '' as skip-cache — align.