Skip to content

Commit 5c518a6

Browse files
author
ben.durrant
committed
add comment explaining why Action needs to be a type alias
1 parent 2063199 commit 5c518a6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/types/actions.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
*
1515
* @template T the type of the action's `type` tag.
1616
*/
17+
// things break if this is an interface #justtypescriptthings
18+
// https://tsplay.dev/wj8X6m
1719
export type Action<T extends string = string> = {
1820
type: T
1921
}

0 commit comments

Comments
 (0)