import * as React from "react";
import styled from "styled-components";
const A = styled.div``;
// Shows a typescript error in v5.4.5
type T1 = React.ComponentProps<typeof A>["as"]
type T2 = React.ComponentProps<typeof A>["forwardedAs"]
// but no error here
<A as='a' />;
<A forwardedAs='a' />;
Environment
typescript: 5.4.5 styled-components: 6.1.8
Reproduction
https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAKjgQwM5wEoFNkGN4BmUEIcARFDvmQNwBQokscqMAngDZYAmcRJ5Vpx4BaXCUgA7LJJipadOuMms4AQTgBeFuy7cAdN2AA3AAan6dAPRW4AZQAWEAO7pkcdmCypcUYGHgsKGIoOGBJOGMAVn0AFn0ouk8sOAAVAEYtTCoYfQBhCQhpWQAFYjBUAB5kiAJ1AD4AbTI0MgBdJLYvNIAmLOw8XILwIpkYMogK6q6sWobmgmhnZChuHjV5DutbACMAV3hJCDggkLgHIKw6So00TQByZHu4K3r6G74llbXuDYenl5vIA
Steps to reproduce
Expected Behavior
as
andforwardedAs
props are available inside React.ComponentProps typeActual Behavior
There are no these props