Skip to content

Commit ee49e8a

Browse files
feat: add generator field to Config type (#397)
1 parent d9e115d commit ee49e8a

File tree

1 file changed

+15
-3
lines changed
  • packages/functions/src/function

1 file changed

+15
-3
lines changed

packages/functions/src/function/v2.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,29 @@ interface RateLimitConfig {
1515

1616
interface BaseConfig {
1717
/**
18-
* Configures the function to serve any static files that match the request
19-
* URL and render the function only if no matching files exist.
18+
* Defines metadata about the framework or extension that has generated the
19+
* function, if applicable. Typically contains the nane and the version.
20+
* Should not be used for functions authored by users.
2021
*/
21-
preferStatic?: boolean
22+
generator?: string
2223

2324
/**
2425
* Limits the HTTP methods for which the function will run. If not set, the
2526
* function will run for all supported methods.
2627
*/
2728
method?: HTTPMethod | HTTPMethod[]
2829

30+
/**
31+
* Configures the function to serve any static files that match the request
32+
* URL and render the function only if no matching files exist.
33+
*/
34+
preferStatic?: boolean
35+
36+
/**
37+
* Set rate-limiting rules for this function.
38+
*
39+
* {@link} https://ntl.fyi/rate-limiting-code
40+
*/
2941
rateLimit?: RateLimitConfig
3042
}
3143

0 commit comments

Comments
 (0)