.
This commit is contained in:
+4
@@ -0,0 +1,4 @@
|
||||
import type { RouteMatch } from './route-match';
|
||||
import type { AppPageRouteDefinition } from '../route-definitions/app-page-route-definition';
|
||||
export interface AppPageRouteMatch extends RouteMatch<AppPageRouteDefinition> {
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
//# sourceMappingURL=app-page-route-match.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":[],"names":[],"mappings":"","ignoreList":[]}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
import type { RouteMatch } from './route-match';
|
||||
import type { AppRouteRouteDefinition } from '../route-definitions/app-route-route-definition';
|
||||
export interface AppRouteRouteMatch extends RouteMatch<AppRouteRouteDefinition> {
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
//# sourceMappingURL=app-route-route-match.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":[],"names":[],"mappings":"","ignoreList":[]}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import type { LocaleRouteDefinition } from '../route-definitions/locale-route-definition';
|
||||
import type { RouteMatch } from './route-match';
|
||||
export interface LocaleRouteMatch<R extends LocaleRouteDefinition> extends RouteMatch<R> {
|
||||
readonly detectedLocale?: string;
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
//# sourceMappingURL=locale-route-match.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":[],"names":[],"mappings":"","ignoreList":[]}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
import type { RouteMatch } from './route-match';
|
||||
import type { PagesAPIRouteDefinition } from '../route-definitions/pages-api-route-definition';
|
||||
export interface PagesAPIRouteMatch extends RouteMatch<PagesAPIRouteDefinition> {
|
||||
}
|
||||
/**
|
||||
* Checks if the given match is a Pages API route match.
|
||||
* @param match the match to check
|
||||
* @returns true if the match is a Pages API route match, false otherwise
|
||||
*/
|
||||
export declare function isPagesAPIRouteMatch(match: RouteMatch): match is PagesAPIRouteMatch;
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "isPagesAPIRouteMatch", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return isPagesAPIRouteMatch;
|
||||
}
|
||||
});
|
||||
const _routekind = require("../route-kind");
|
||||
function isPagesAPIRouteMatch(match) {
|
||||
return match.definition.kind === _routekind.RouteKind.PAGES_API;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=pages-api-route-match.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/server/route-matches/pages-api-route-match.ts"],"sourcesContent":["import type { RouteMatch } from './route-match'\nimport type { PagesAPIRouteDefinition } from '../route-definitions/pages-api-route-definition'\n\nimport { RouteKind } from '../route-kind'\n\nexport interface PagesAPIRouteMatch\n extends RouteMatch<PagesAPIRouteDefinition> {}\n\n/**\n * Checks if the given match is a Pages API route match.\n * @param match the match to check\n * @returns true if the match is a Pages API route match, false otherwise\n */\nexport function isPagesAPIRouteMatch(\n match: RouteMatch\n): match is PagesAPIRouteMatch {\n return match.definition.kind === RouteKind.PAGES_API\n}\n"],"names":["isPagesAPIRouteMatch","match","definition","kind","RouteKind","PAGES_API"],"mappings":";;;;+BAagBA;;;eAAAA;;;2BAVU;AAUnB,SAASA,qBACdC,KAAiB;IAEjB,OAAOA,MAAMC,UAAU,CAACC,IAAI,KAAKC,oBAAS,CAACC,SAAS;AACtD","ignoreList":[0]}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
import type { PagesRouteDefinition } from '../route-definitions/pages-route-definition';
|
||||
import type { LocaleRouteMatch } from './locale-route-match';
|
||||
export interface PagesRouteMatch extends LocaleRouteMatch<PagesRouteDefinition> {
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
//# sourceMappingURL=pages-route-match.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":[],"names":[],"mappings":"","ignoreList":[]}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
import type { Params } from '../request/params';
|
||||
import type { RouteDefinition } from '../route-definitions/route-definition';
|
||||
/**
|
||||
* RouteMatch is the resolved match for a given request. This will contain all
|
||||
* the dynamic parameters used for this route.
|
||||
*/
|
||||
export interface RouteMatch<D extends RouteDefinition = RouteDefinition> {
|
||||
readonly definition: D;
|
||||
/**
|
||||
* params when provided are the dynamic route parameters that were parsed from
|
||||
* the incoming request pathname. If a route match is returned without any
|
||||
* params, it should be considered a static route.
|
||||
*/
|
||||
readonly params: Params | undefined;
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
//# sourceMappingURL=route-match.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":[],"names":[],"mappings":"","ignoreList":[]}
|
||||
Reference in New Issue
Block a user