Closed SantoJambit closed 4 years ago
Can you provide a repro? I tried to create a repro but it doesn't throw me any error.
Sure, here it is: https://codesandbox.io/s/xenodochial-dan-dfthl
Thank you for reporting it. This issue has been fixed in 2.1.4.
:tada: This issue has been resolved in version 3.0.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
I have a situation where I need to define the ActionCreator type manually:
This works with 2.1.0, but not with 2.1.2. In 2.1.2, I get this error:
Trivia: The reason why I need to do this is because TranslationKey is created via declaration merging and typescript currently has a bug, which expands the keys into the declaration file: https://github.com/microsoft/TypeScript/issues/27171
I.e. instead of generating a type
(type: 'error' | 'success', labelKey: TranslationKey) => ...
, typescript generates a type(type: 'error' | 'success', labelKey: 'Key1' | 'Key2' | ... | 'KeyN') => ...
, which breaks the declaration merging pattern I need in this case. By defining the ActionCreator type manually as seen above, I can avoid this issue.