Skip to content

Commit

Permalink
Link to the TypeScript type narrowing issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
lgarron committed Dec 10, 2024
1 parent ff4f4d8 commit 3acfd00
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ArqBackupPlan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ export interface FinishedBackupActivityJSON
}

// Note: this should be `|` rather than `&`, but this is `&` due to TypeScript
// limitations.
// limitations. See:
//
// - https://github.com/microsoft/TypeScript/issues/55239#issuecomment-1662572540
// - https://github.com/microsoft/TypeScript/issues/4196
//
// This means that `if (backupActivityJSON.message === "Idle")` unfortunately
// cannot type narrow the type of backupActivityJSON from `BackupActivityJSON`
Expand Down

0 comments on commit 3acfd00

Please sign in to comment.