Skip to content

Commit 65c394d

Browse files
committed
fix type for getContext
1 parent e47da59 commit 65c394d

4 files changed

Lines changed: 8 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,11 @@ If you are using Angular 20 or Angular 19 with App Engine Developer Preview:
119119
```ts
120120
import { AngularAppEngine, createRequestHandler } from '@angular/ssr'
121121
import { getContext } from '@netlify/angular-runtime/context.js'
122-
import type { Context } from '@netlify/edge-functions'
123122

124123
const angularAppEngine = new AngularAppEngine()
125124

126125
export async function netlifyAppEngineHandler(request: Request): Promise<Response> {
127-
const context: Context = getContext()
126+
const context = getContext()
128127

129128
// Example API endpoints can be defined here.
130129
// Uncomment and define endpoints as necessary.

package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,14 @@
9393
"node": "^22.22.0 || ^24.13.1 || >=26.0.0"
9494
},
9595
"devDependencies": {
96-
"@opentelemetry/api": "~1.8.0",
96+
"@netlify/build": "^35.13.5",
97+
"@netlify/edge-functions": "^3.0.6",
9798
"@netlify/eslint-config-node": "^7.0.1",
99+
"@opentelemetry/api": "~1.8.0",
98100
"@types/node": "^24.0.0",
99101
"eslint-plugin-unicorn": "^49.0.0",
100102
"husky": "^9.1.7",
101103
"netlify-cli": "^26.0.1",
102-
"@netlify/build": "^35.13.5",
103104
"npm-run-all2": "^8.0.4",
104105
"prettier": "^3.8.3"
105106
},

src/context.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
export declare function getContext(): any
1+
import type { Context } from '@netlify/edge-functions'
2+
3+
export declare function getContext(): Context | undefined

0 commit comments

Comments
 (0)