Skip to content

Commit

Permalink
chore(gatsby): perfect GatsbyConfig.proxy type (#36548)
Browse files Browse the repository at this point in the history
Co-authored-by: nnmax <hi.max@foxemail.com>
  • Loading branch information
nnmax and nnmax committed Sep 6, 2022
1 parent 1125e58 commit dc9aa9a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/gatsby/index.d.ts
Expand Up @@ -261,6 +261,11 @@ export interface GraphQLTypegenOptions {
generateOnBuild?: boolean
}

type Proxy = {
prefix: string
url: string
}

/**
* Gatsby configuration API.
*
Expand Down Expand Up @@ -290,10 +295,7 @@ export interface GatsbyConfig {
* Setting the proxy config option will tell the develop server to proxy any unknown requests to your specified server.
* @see https://www.gatsbyjs.com/docs/api-proxy/
* */
proxy?: {
prefix: string
url: string
}
proxy?: Proxy | Proxy[]
/**
* A list of trusted URLs that will be proxied for use with the gatsby-script off-main-thread strategy.
* @see https://gatsby.dev/gatsby-script
Expand Down

0 comments on commit dc9aa9a

Please sign in to comment.