Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: broken ChecksumConfiguration and ConditionalRecursiveTransformEx…
…act interface in TS < 4.4 (#926) * fix: broken ChecksumConfiguration interface in TS < 4.4 Before TS 4.4, TS does not allow the index signature as union type. Consuming library with this interface will cause error: "TS1337: An index signature parameter type cannot be a union type. Consider using a mapped object type instead. [other: string | number]: any;". This issue was fixed in TS 4.4: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-4.html#symbol-and-template-string-pattern-index-signatures Fixing this issue so it won't break users with TSC < 4.4 * fix(types): conditional generic types in TS<4.1 The referred type `ConditionalRecursiveTransformExact<T, FromType, ToType>` uses conditional generic type that is only supported in TS>=4.1. However the typesVersions directs consumers' TSC 4.0 to the types with this definition, hence consumers will see following error: error TS2315: Type 'ConditionalRecursiveTransformExact' is not generic. Changing the typesVersions directive resolves the issue.
- Loading branch information