piotrwitek / typesafe-actions

Typesafe utilities for "action-creators" in Redux / Flux Architecture
https://codesandbox.io/s/github/piotrwitek/typesafe-actions/tree/master/codesandbox
MIT License
2.41k stars 98 forks source link

Error After upgrade from Angular 13 to 14 (A type annotation is necessary) #261

Closed pilz97 closed 2 years ago

pilz97 commented 2 years ago

After Angular upgrade from 13 to 14 i got an error

The inferred type of 'loadOpenTableIds' cannot be named without a reference to 'my-lib/node_modules/typesafe-actions/dist/create-async-action'. This is likely not portable. A type annotation is necessary.

export const aAsyncAction = createAsyncAction(...

i have to write export const aAsyncAction: any =..

does anyone know why it worked before and now i have to add an type?

pilz97 commented 2 years ago

https://github.com/microsoft/TypeScript/issues/42873#issuecomment-1221424143 solves my issue