v6.0.0
@ackee/petrus@6.0.0
-
✅ Migration to TS – strict mode
-
🎉 Setup typedoc → Auto generated Wiki with API interfaces
-
✨ Usage example avail. within codesandbox & integrate codesandbox to CI
-
♻️ Extend
PetrusErrorwithtype: PetrusErrorTypeandoriginalError: Errorprops & exportPetrusErrorTypeenum andisPetrusError(error: any): booleanutil. Example -
💥 replace
reducerKeywithselectorfunction so developer can place petrus reducer at arbitrary depth and path in redux store.import { configure } from '@ackee/petrus'; configure({ - reducerKey: 'auth', + selector: state => state.auth, }) -
💥 No more generics at
configuremethod. If you want override internal interfaces (PetrusAppRootState,PetrusUser,PetrusCredentials,PetrusTokens), you can achieve it like this:declare module '@ackee/petrus' { interface ConfigurePetrusAppRootState { value: RootState; } interface ConfigurePetrusUser { value: AuthUser; } interface ConfigurePetrusCredentials { value: Credentials; } interface ConfigurePetrusTokens { value: Tokens; } }