Skip to content

Commit

Permalink
chore(gatsby): correct flow typing file-parser (gatsbyjs#33584)
Browse files Browse the repository at this point in the history
Co-authored-by: gatsbybot <[email protected]>
Co-authored-by: LekoArts <[email protected]>
  • Loading branch information
3 people authored Oct 25, 2021
1 parent 9d8413c commit 89bf9f2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/gatsby/src/query/file-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,10 @@ export default class FileParser {
this.parentSpan = parentSpan
}

async parseFile(file: string, addError): Promise<?DocumentNode> {
async parseFile(
file: string,
addError
): Promise<?Array<GraphQLDocumentInFile>> {
let text
try {
text = await fs.readFile(file, `utf8`)
Expand Down Expand Up @@ -625,7 +628,7 @@ export default class FileParser {
async parseFiles(
files: Array<string>,
addError
): Promise<Array<DocumentNode>> {
): Promise<Array<GraphQLDocumentInFile>> {
const documents = []

return Promise.all(
Expand Down

0 comments on commit 89bf9f2

Please sign in to comment.