Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5c390ab

Browse filesBrowse files
feat: add excludedPath property (#509)
**Which problem is this pull request solving?** Part of https://linear.app/netlify/issue/COM-724/excludedpath-in-functions-v2.
1 parent 3529a39 commit 5c390ab
Copy full SHA for 5c390ab

File tree

Expand file treeCollapse file tree

1 file changed

+20
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+20
-0
lines changed

‎src/function/v2.ts

Copy file name to clipboardExpand all lines: src/function/v2.ts
+20Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@ interface BaseConfig {
3030
}
3131

3232
interface ConfigWithPath extends BaseConfig {
33+
/**
34+
* One or more URL paths for which the function will not run, even if they
35+
* match a path defined with the `path` property. Paths must begin with a
36+
* forward slash.
37+
*
38+
* {@link} https://ntl.fyi/func-routing
39+
*/
40+
excludedPath?: Path | Path[]
41+
3342
/**
3443
* One or more URL paths for which the function will run. Paths must begin
3544
* with a forward slash.
@@ -38,10 +47,21 @@ interface ConfigWithPath extends BaseConfig {
3847
*/
3948
path?: Path | Path[]
4049

50+
/**
51+
* The `schedule` property cannot be used when `path` is used.
52+
*/
4153
schedule?: never
4254
}
4355

4456
interface ConfigWithSchedule extends BaseConfig {
57+
/**
58+
* The `excludedPath` property cannot be used when `schedule` is used.
59+
*/
60+
excludedPath?: never
61+
62+
/**
63+
* The `path` property cannot be used when `schedule` is used.
64+
*/
4565
path?: never
4666

4767
/**

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.