Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix mismatch between CSSInterpolation and Interpolation<Props> (#3164)
* Add explicit test for uncovered regression; fix interpolation type to make it pass * Reorder overloads for styled component creator Formerly, the first overload to be tried was not accepting template strings array as first argument. Therefore, it couldn't be used when `styled` was used as a tag for template string. So in this case TS skipped this overload and fell through to the next. Now, though, with `ArrayInterpolation` type changed, `TemplateStringsArray` matches the definition of `ArrayInterpolation`; therefore, this overload becomes used for template strings, confusing type inference. This change moves this overload to the end of the list, i.e. to be used as fallback when there's actually a direct function call, without template string. * yarn changeset * Apply suggestions from code review * Create tiny-snails-watch.md --------- Co-authored-by: Mateusz Burzyński <[email protected]>
- Loading branch information