Environment
System:
- OS: macOS 14.4.1
- CPU: (8) x64 Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz
- Memory: 1.01 GB / 32.00 GB
- Shell: 5.9 - /bin/zsh
Binaries:
- Node: 20.12.2 - ~/.nvm/versions/node/v20.12.2/bin/node
- Yarn: 3.8.1 - ~/.nvm/versions/node/v20.12.2/bin/yarn
- npm: 10.5.0 - ~/.nvm/versions/node/v20.12.2/bin/npm
Reproduction
https://stackblitz.com/edit/vitejs-vite-esazjv?file=src%2FApp.tsx,package.json
Steps to reproduce
import styled from 'styled-components';
const One = styled.div``;
const Two = styled(One)``;
const foo = (component: typeof One) => {
// do something
};
foo(Two);
Expected Behavior
No type error.
Actual Behavior

Environment
System:
Binaries:
Reproduction
https://stackblitz.com/edit/vitejs-vite-esazjv?file=src%2FApp.tsx,package.json
Steps to reproduce
Expected Behavior
No type error.
Actual Behavior