TypeScript newbie here. I have a below component using styled-components that I would like to convert to TypeScript.
import React from 'react' import PropTypes from 'prop-types' import styled from 'styled-components' const propTypes = { name: PropTypes.string.isRequired // https://material.io/tools/icons/?style=baseline } const Icon = styled(({name, className, ...props}) => <i className={`material-icons ${className}`} {...props}>{name}</i>)` font-size: ${props => props.theme.sizeLarger}; ` Icon.propTypes = propTypes export default Icon I know I can replace my propTypes with an interface
interface Props { name: string } However, TypeScript complains that I leave className undeclared. The thing is, I would ideally like to use the interface as a sort of spec for props that a developer can provide, without having to declare props like className or theme which are injected by libraries like styled-components.
How do I properly convert this component to TypeScript?

