Skip to content

Commit 2d7c70d

Browse files
fightbulcclaude
andcommitted
fix: Resolve TypeScript type-check errors
- Remove duplicate MigrationRunnerOptions export from type exports block - Fix undefined type error in rollbackLast() by explicitly handling array access with type cast - All tests pass (439/439), linting clean, CodeRabbit review complete 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 81e697c commit 2d7c70d

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ export type {
4343
RunResult,
4444
Migration,
4545
AppliedMigration,
46-
MigrationRunnerOptions,
4746
EntityId,
4847
RowMapper,
4948
} from "./types.ts"

src/migrations/migration-runner.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,9 @@ export class MigrationRunner {
149149
}
150150

151151
// Get the last applied migration (reverse order)
152-
const lastVersion = appliedVersions[appliedVersions.length - 1]
152+
// Safe to access since we've checked length > 0
153+
const lastIndex = appliedVersions.length - 1
154+
const lastVersion = appliedVersions[lastIndex] as string
153155
const result = await this.rollbackMigration(lastVersion)
154156

155157
if (result.isError) {

0 commit comments

Comments
 (0)