-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gatsby-image/withIEPolyfill is missing typings #14592
Comments
@janKir sounds like you have a great handle on this, and the steps necessary to make the change. We'd love a PR! |
In my gatsby project, typings are recognized if I put the following import * as React from "react"
import GatsbyImage, { GatsbyImageProps } from "../index"
interface GatsbyImageWithIEPolyfillProps extends GatsbyImageProps {
objectFit?: `fill` | `contain` | `cover` | `none` | `scale-down`
objectPosition?: string
}
export default class GatsbyImageWithIEPolyfill extends React.Component<
GatsbyImageWithIEPolyfillProps,
any
> {} I haven't contributed to gatsby before so actually I don't really know all the steps necessary to file a PR. |
Of course! We'll we'd love to have this be your first, so let me help walk you through that!
Please let us know if we can provide any more info! I'm looking forward to the PR! |
…atsbyjs#14592 (gatsbyjs#14641) * add types for gatsby-image/withIEPolyfill * remove state generic
Description
When importing in Typescript from
gatsby-image/withIEPolyfill
vscode says that itIn the root folder of gatsby-image is a
index.d.ts
which is missing in thewithIEPolyfill
submodule. I need to use this submodule because theobjectFit
prop doesn't seem to work otherwise.Steps to reproduce
import Img from 'gatsby-image/withIEPolyfill';
Expected result
Types should exist for the
withIEPolyfill
submodule.Actual result
error (in vscode):
Environment
Actually this command throws the following error after the last line (translated from German):
The text was updated successfully, but these errors were encountered: