Broken in TypeScript < 4.7 #1227
Labels
bug report 🦗
Issue is probably a bug, but it needs to be checked
bundler: webpack 📦
Issue is related to webpack bundler
cat: typings 👮
Typescript types related issues
needs: complete repro 🖥️
Issue need to have complete repro provided
Environment
Linaria version:
Bundler (+ version): webpack 5
Node.js version: 18
OS: ubuntu
Description
This is because validateParams uses a 4.7 feature extends Constraints on infer Type Variables
Without this, only 4.1 is really needed (at least for parsing) as it introduced string template literals.
Reproducible Demo
Can't figure out how to set the TypeScript version in stackblitz, but literally any setup with just one import will trigger this with typescript 4.1
Solution
You can add an entry for types less than 4.7 . This could include the same types except one module that is changed to be more loose just so it works in 4.1
The text was updated successfully, but these errors were encountered: