Skip to content

Commit f2b1821

Browse files
juliette prétotpieh
authored andcommitted
fix(gatsby-image): update typescript definitions - properly mark fields as optional (#10419)
It seems like these should not be a mandatory. At the moment when building a TypeScript gatsby site, TypeScript forces the user to pass a value.
1 parent a0bba64 commit f2b1821

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/gatsby-image/index.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ interface FluidObject {
1616
src: string
1717
srcSet: string
1818
sizes: string
19-
base64: string
20-
tracedSVG: string
21-
srcWebp: string
22-
srcSetWebp: string
19+
base64?: string
20+
tracedSVG?: string
21+
srcWebp?: string
22+
srcSetWebp?: string
2323
}
2424

2525
interface GatsbyImageProps {
@@ -34,7 +34,7 @@ interface GatsbyImageProps {
3434
critical?: boolean
3535
style?: object
3636
imgStyle?: object
37-
placeholderStyle: object
37+
placeholderStyle?: object
3838
backgroundColor?: string | boolean
3939
onLoad?: () => void
4040
onStartLoad?: (param: { wasCached: boolean }) => void

0 commit comments

Comments
 (0)