Skip to content

Commit f4360c9

Browse files
fix: reinstate missing edge functions types (#280)
1 parent 1e35cda commit f4360c9

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

packages/edge-functions/dev/shared/types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
import type { Context } from '@netlify/types'
12
import type { Config } from '../../src/lib/config.ts'
23

3-
export type EdgeFunction = { config?: Config; default: (req: Request, context: object) => Promise<Response> }
4+
export type EdgeFunction = { config?: Config; default: (req: Request, context: Context) => Promise<Response> }
45

56
export interface RunOptions {
67
bootstrapURL: string

packages/edge-functions/src/main.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
export type { Context, Cookie } from '@netlify/types'
12
export type { Config, IntegrationsConfig, Manifest, ManifestFunction } from './lib/config.js'
3+
export type { EdgeFunction } from '../dev/shared/types.js'

packages/types/src/lib/context/cookies.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
interface Cookie {
1+
export interface Cookie {
22
/** Name of the cookie. */
33
name: string
44
/** Value of the cookie. */

packages/types/src/main.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
export type { Context } from './lib/context/context.js'
2+
export type { Cookie } from './lib/context/cookies.js'
23
export type { EnvironmentVariables } from './lib/environment-variables.js'
34
export type { NetlifyGlobal } from './lib/globals.js'

0 commit comments

Comments
 (0)