Skip to content

Commit

Permalink
fix(gatsby): fix redux Node type
Browse files Browse the repository at this point in the history
I guess nothing was depending on this yet but the `nodes` property is definitely a `Map`, not an array.

Also exporting the Node type because we'll need this a few times later.
  • Loading branch information
pvdz committed Feb 18, 2020
1 parent c2cd6ec commit e2bae1c
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions packages/gatsby/src/redux/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ export enum ProgramStatus {
BOOTSTRAP_QUERY_RUNNING_FINISHED = `BOOTSTRAP_QUERY_RUNNING_FINISHED`,
}

export type IReduxNode = {
id: string
internal: {
type: string
}
}

export interface IReduxState {
status: ProgramStatus
nodes?: {
id: string
internal: {
type: string
}
}[]
nodes?: Map<string, IReduxNode>
nodesByType?: Map<any, any> // TODO
jobsV2: any // TODO
lastAction: ActionsUnion
Expand Down

0 comments on commit e2bae1c

Please sign in to comment.