decord/alpha/source/modules/routing/RouteParam.tsx
github-actions c6aa9eb120 chore: update source for alpha 349.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5030.js (118.4 MB)
2026-10-01 06:55:13 +00:00

71 lines
2 KiB
TypeScript

// Module ID: 4703
// Function ID: 4704
// Name: RouteParam
// Dependencies: [1075, 2051, 1083, 4704, 2]
// Module 4703 (RouteParam)
import RouteConstants from "RouteConstants" /* 1075 */;
import utils_PathUtils from "utils/PathUtils" /* 1083 */;
import ChannelConstants from "ChannelConstants" /* 2051 */;
import escapeRegExpDefault from "escapeRegExp" /* 4704 */;
import size from "module_2" /* 2 */;
const PSEUDO_GUILD_IDS = RouteConstants.PSEUDO_GUILD_IDS;
const StaticChannelRoutes = ChannelConstants.StaticChannelRoutes;
const result = size.fileFinishedImporting("modules/routing/RouteParam.tsx");
export const RouteParam = {
guildId() {
let obj = arg0;
if (arg0 === undefined) {
obj = {};
}
let str = obj.name;
if (str === undefined) {
str = "guildId";
}
let flag = obj.optional;
if (flag === undefined) {
flag = false;
}
const mapped = PSEUDO_GUILD_IDS.map(escapeRegExpDefault);
const combined = "" + mapped.join("|") + "|\\d+";
let flag2 = { optional: flag }.optional;
if (flag2 === undefined) {
flag2 = false;
}
let str2 = "";
if (flag2) {
str2 = "?";
}
const unescapedPathParam = new utils_PathUtils.UnescapedPathParam(":" + escapeRegExpDefault(str) + "(" + combined + ")" + str2);
return unescapedPathParam;
},
channelId() {
let obj = arg0;
if (arg0 === undefined) {
obj = {};
}
let str = obj.name;
if (str === undefined) {
str = "channelId";
}
let flag = obj.optional;
if (flag === undefined) {
flag = false;
}
const items = [...StaticChannelRoutes];
const mapped = items.map(escapeRegExpDefault);
const combined = "" + mapped.join("|") + "|\\d+";
let flag2 = { optional: flag }.optional;
if (flag2 === undefined) {
flag2 = false;
}
let str2 = "";
if (flag2) {
str2 = "?";
}
const unescapedPathParam = new utils_PathUtils.UnescapedPathParam(":" + escapeRegExpDefault(str) + "(" + combined + ")" + str2);
return unescapedPathParam;
}
};