Skip to content

Commit

Permalink
convert stage from string to union values
Browse files Browse the repository at this point in the history
  • Loading branch information
wardpeet committed Apr 26, 2019
1 parent 6e2a96f commit 9223292
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/gatsby/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ export interface GatsbyConfig {
// alias for our api runner returns
type AnyOrPromiseAny = any | Promise<any>

// all available gatsby stages
type GatsbyStages = "develop" | "develop-html" | "build-javascript" | "build-html"

/**
* Gatsby API for Node.js.
*
Expand Down Expand Up @@ -314,7 +317,7 @@ export interface CreatePagesArgs extends ParentSpanPluginArgs {
}

export interface CreateBabelConfigArgs extends ParentSpanPluginArgs {
stage: string
stage: GatsbyStages
}

export interface CreateDevServerArgs extends ParentSpanPluginArgs {
Expand All @@ -337,7 +340,7 @@ export interface CreatePageArgs extends ParentSpanPluginArgs {

export interface CreateWebpackConfigArgs extends ParentSpanPluginArgs {
getConfig: Function
stage: string
stage: GatsbyStages
rules: WebpackRules
loaders: WebpackLoaders
plugins: WebpackPlugins
Expand Down

0 comments on commit 9223292

Please sign in to comment.