{"version":3,"file":"type.luau","names":[],"sources":["..\\..\\src\\centurion\\type.ts"],"sourcesContent":["/*\n * ──────────────────────────────────────────────\n * Augmentable Centurion user-type interface\n *\n * External packages and consumers add entries via declaration merging:\n *\n *   declare module \"@lisachandra/platform/centurion/type\" {\n *       interface CenturionUserTypes {\n *           Item: \"item\";\n *           PlayerEntities: \"playerEntities\";\n *       }\n *   }\n * ──────────────────────────────────────────────\n */\n\n/**\n * Augmentable interface mapping user-type keys to their Centurion argument type name strings.\n *\n * @remarks\n *   External packages and consumers should augment this interface via `declare module` so that all\n *   centurion types across the entire codebase are discoverable from a single import location —\n *   `@lisachandra/platform`.\n */\nexport interface CenturionUserTypes {\n\tEntities: \"entities\";\n\tEntity: \"entity\";\n}\n\n/** Set of keys for all registered Centurion user argument types. */\nexport type CenturionUserTypeKey = keyof CenturionUserTypes;\n\n/*\n * ──────────────────────────────────────────────\n * Runtime type name registry\n * ──────────────────────────────────────────────\n */\n\n/**\n * The single source of truth for all Centurion user-type name constants.\n *\n * Mirrors `CenturionType` from `@rbxts/centurion`. Consumers and external packages extend this\n * object via {@link registerCenturionType}, so `CenturionUserType.Foo` resolves to `\"foo\"` at both\n * compile time and runtime — no manual spreading needed.\n *\n * @example\n * \t```ts\n * \timport { CenturionUserType } from \"@lisachandra/platform\";\n *\n * \t// Use directly in command argument definitions:\n * \targuments: [{ type: CenturionUserType.Entity, name: \"target\", ... }]\n * \t```;\n */\nexport const CenturionUserType: Record<string, string> = {\n\tEntities: \"entities\",\n\tEntity: \"entity\",\n};\n\n/**\n * Registers a custom Centurion argument type at runtime, adding it directly to\n * {@link CenturionUserType}.\n *\n * Pair with a `declare module` augmentation of {@link CenturionUserTypes} so the key is known at\n * compile time as well.\n *\n * @example\n * \t```ts\n * \tdeclare module \"@lisachandra/platform/centurion/type\" {\n * \t\tinterface CenturionUserTypes {\n * \t\t\tItem: \"item\";\n * \t\t}\n * \t}\n * \tregisterCenturionType(\"Item\", \"item\");\n * \t// CenturionUserType.Item === \"item\"\n * \t```;\n *\n * @param key - The type key to register.\n * @param name - The string identifier used in Centurion command argument definitions (e.g. The\n *   `type` field).\n */\nexport function registerCenturionType(key: string, name: string): void {\n\tCenturionUserType[key] = name;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA;AACC;AACD","ignoreList":[]}