{"record":{"id":"5327a6b0d715ddc2","repo":"slidevjs/slidev","slug":"unknown-timestamp-remaining-remaining","errorCode":null,"errorMessage":"Unknown timestamp remaining: ${remaining}","messagePattern":"Unknown timestamp remaining: (.+?)","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/parser/src/timesplit/timestring.ts","lineNumber":101,"sourceCode":"    }\n    const regex = /([\\d.]+)([a-z]+)/gi\n    const matches = timestamp.matchAll(regex)\n    if (matches) {\n      for (const match of matches) {\n        const value = Number(match[1])\n        if (Number.isNaN(value)) {\n          throw new TypeError(`Invalid timestamp value: ${match[1]}`)\n        }\n        const unit = match[2].toLowerCase()\n        if (!(unit in unitMap)) {\n          throw new TypeError(`Invalid timestamp unit: ${unit}`)\n        }\n        seconds += value * unitMap[unit]\n      }\n    }\n    const remaining = timestamp.replace(regex, '').trim()\n    if (remaining) {\n      throw new TypeError(`Unknown timestamp remaining: ${remaining}`)\n    }\n  }\n\n  return {\n    seconds,\n    relative,\n  }\n}\n","sourceCodeStart":83,"sourceCodeEnd":110,"githubUrl":"https://github.com/slidevjs/slidev/blob/0d798ace5828966d9f77f62094d5f7a971ad98f7/packages/parser/src/timesplit/timestring.ts#L83-L110","documentation":"After stripping every <number><unit> segment from the timestamp string, leftover characters remain. The parser expects the entire string (after trimming) to be consumed.","triggerScenarios":"Strings like '5s foo', '5s,3s' (comma), or '5s (approx)' where non-matching text survives the regex pass.","commonSituations":"Pasting human-readable durations with annotations or separators; trailing punctuation.","solutions":["Remove any text that is not a <number><unit> pair","Use a single separator-less form (5s3m) for compound durations","Strip parenthetical notes or comments out of the timestamp"],"exampleFix":"// before\ntimesplit: 5s (approx)\n// after\ntimesplit: 5s","handlingStrategy":"validation","validationCode":"function fullyConsumed(ts: string): boolean {\n  return ts.replace(/[\\d.]+[a-z]+/gi, '').trim() === ''\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep timestamps to pure <number><unit> sequences with no extra text","Strip annotations before storing a timestamp"],"tags":["timestamp","parser","validation"],"backgroundTag":null,"analyzedSha":"0d798ace5828966d9f77f62094d5f7a971ad98f7","analyzedAt":"2026-08-12T17:10:56.221Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}