TypeScript. Type instantiation is excessively deep and possibly infinite. How to fix.

Type instantiation is excessively deep and possibly infinite.ts(2589)
const InputContainer = styled(Container)`&& {   width: ${props => props.width || 500}px;}` as typeof Container
const InputContainer = styled(Container)<typeof Container>`
...
`

--

--

--

I’m front-end developer and really passionate programmer, caring husband and pancake baker on Sundays. School teacher of computer studies in the past.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ilya Zykin

Ilya Zykin

I’m front-end developer and really passionate programmer, caring husband and pancake baker on Sundays. School teacher of computer studies in the past.

More from Medium

Creating a PWA Using React and Adding Manual Controls to Update Service Worker

Create a Netflix Video Player with React-Player, Typescript, and Styled-Components

Jest tests failed when using csv-parse/sync library

Typescript with Grafikart, my resume