Repository navigation
3.2.0
What's Changed
Full Changelog: 3.1.2...3.2.0
Updates
- Improve types for subcontext and features
const createErrorContext = createError([{ errorType: "ErrorType1" }, { errorType: "ErrorType2" }] as const);
// ErrorSubcontext<ContextName, "ErrorType1" | "ErrorType2">
const errorContext = createErrorContext("Context");
// ErrorSubcontext<"Context", "ErrorType1" | "ErrorType2">
const featureError = errorContext.feature("Feature");
// ErrorFeature<"Context/Feature", "ErrorType1" | "ErrorType2">- Add new utility type readme