v8.0.1
Improvements
The performance of type inference for union string types has been improved.
Before the improvement
Previously, union string types were split into an array of strings using the |
operator, and type inference was performed on each union element one by one, manually checking whether each element needed type conversion. This method was inefficient, as it required sequentially extracting and processing each array element.
After the improvement
In this version, the approach has been changed to split string literal types and create a union type directly, and then perform type conversion on the union type as a whole. This eliminates the need to sequentially process each array element, significantly improving the performance of type inference.