Skip to content

Commit 09abf7b

Browse files
committed
fixed toString() as string literal
1 parent a3c46f5 commit 09abf7b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/createAction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export function createAction<P = any, T extends string = string>(
3939
return { type, payload }
4040
}
4141

42-
actionCreator.toString = () => `${type}`
42+
actionCreator.toString = (): T => `${type}` as T
4343

4444
actionCreator.type = type
4545

0 commit comments

Comments
 (0)