;\n/**\r\n * @internal\r\n */\n\nexport type IfMaybeUndefined = [undefined] extends [P] ? True : False;\n/**\r\n * @internal\r\n */\n\nexport type IfVoid
= [void] extends [P] ? True : False;\n/**\r\n * @internal\r\n */\n\nexport type IsEmptyObj = T extends any ? keyof T extends never ? IsUnknown>> : False : never;\n/**\r\n * returns True if TS version is above 3.5, False if below.\r\n * uses feature detection to detect TS version >= 3.5\r\n * * versions below 3.5 will return `{}` for unresolvable interference\r\n * * versions above will return `unknown`\r\n *\r\n * @internal\r\n */\n\nexport type AtLeastTS35 = [True, False][IsUnknown() => T>, 0, 1>];\n/**\r\n * @internal\r\n */\n\nexport type IsUnknownOrNonInferrable = AtLeastTS35, IsEmptyObj>>;\n/**\r\n * Convert a Union type `(A|B)` to an intersection type `(A&B)`\r\n */\n\nexport type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; // Appears to have a convenient side effect of ignoring `never` even if that's not what you specified\n\nexport type ExcludeFromTuple = T extends [infer Head, ...infer Tail] ? ExcludeFromTuple : Acc;\ntype ExtractDispatchFromMiddlewareTuple = MiddlewareTuple extends [infer Head, ...infer Tail] ? ExtractDispatchFromMiddlewareTuple ? IsAny : {})> : Acc;\nexport type ExtractDispatchExtensions = M extends Tuple ? ExtractDispatchFromMiddlewareTuple : M extends ReadonlyArray ? ExtractDispatchFromMiddlewareTuple<[...M], {}> : never;\ntype ExtractStoreExtensionsFromEnhancerTuple = EnhancerTuple extends [infer Head, ...infer Tail] ? ExtractStoreExtensionsFromEnhancerTuple ? IsAny : {})> : Acc;\nexport type ExtractStoreExtensions = E extends Tuple ? ExtractStoreExtensionsFromEnhancerTuple : E extends ReadonlyArray ? UnionToIntersection ? Ext extends {} ? IsAny : {} : {}> : never;\ntype ExtractStateExtensionsFromEnhancerTuple = EnhancerTuple extends [infer Head, ...infer Tail] ? ExtractStateExtensionsFromEnhancerTuple ? IsAny : {})> : Acc;\nexport type ExtractStateExtensions = E extends Tuple ? ExtractStateExtensionsFromEnhancerTuple : E extends ReadonlyArray ? UnionToIntersection ? StateExt extends {} ? IsAny : {} : {}> : never;\n/**\r\n * Helper type. Passes T out again, but boxes it in a way that it cannot\r\n * \"widen\" the type by accident if it is a generic that should be inferred\r\n * from elsewhere.\r\n *\r\n * @internal\r\n */\n\nexport type NoInfer = [T][T extends any ? 0 : never];\nexport type NonUndefined = T extends undefined ? never : T;\nexport type Omit = Pick>;\nexport type WithRequiredProp = Omit & Required>;\nexport type WithOptionalProp = Omit & Partial>;\nexport interface TypeGuard