lol-constants 2.26.0 → 3.0.0-rc.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +130 -28
- package/dist/Locale.d.ts +2 -0
- package/dist/Patch.d.ts +3 -0
- package/dist/Patch.js +3 -0
- package/{core/constants/Champions/ChampionClasses.d.ts → dist/constants/custom.d.ts} +1 -1
- package/{core/constants/Champions/ChampionClasses.js → dist/constants/custom.js} +2 -2
- package/dist/constants/events.d.ts +49 -0
- package/dist/constants/events.js +55 -0
- package/dist/constants/history.d.ts +26 -0
- package/dist/constants/history.js +29 -0
- package/{core/constants/RankedTiers.d.ts → dist/constants/leagues.d.ts} +9 -1
- package/{core/constants/RankedTiers.js → dist/constants/leagues.js} +11 -2
- package/{core/constants/Locales.d.ts → dist/constants/locales.d.ts} +1 -1
- package/{core/constants/Locales.js → dist/constants/locales.js} +2 -2
- package/dist/constants/participants.d.ts +38 -0
- package/dist/constants/participants.js +43 -0
- package/dist/enums/ItemSrTypes.d.ts +11 -0
- package/dist/enums/ItemSrTypes.js +10 -0
- package/dist/enums/StatRuneSlots.d.ts +6 -0
- package/dist/enums/StatRuneSlots.js +5 -0
- package/dist/helpers/champion.d.ts +678 -0
- package/dist/helpers/champion.js +18 -0
- package/dist/helpers/item.d.ts +39 -0
- package/dist/helpers/item.js +113 -0
- package/dist/helpers/riotId.d.ts +16 -0
- package/dist/helpers/riotId.js +33 -0
- package/dist/helpers/rune.d.ts +36 -0
- package/dist/helpers/rune.js +70 -0
- package/dist/helpers/spell.d.ts +6 -0
- package/dist/helpers/spell.js +18 -0
- package/dist/helpers/type.d.ts +3 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +27 -0
- package/dist/lol.d.ts +4029 -0
- package/dist/lol.js +182 -0
- package/dist/objects/Maps.d.ts +113 -0
- package/dist/objects/Maps.js +69 -0
- package/dist/objects/Queues.d.ts +192 -0
- package/dist/objects/Queues.js +71 -0
- package/dist/objects/Regions.d.ts +132 -0
- package/dist/objects/Regions.js +55 -0
- package/dist/objects/generated/Champions.d.ts +1858 -0
- package/dist/objects/generated/Champions.js +4 -0
- package/dist/objects/generated/Items.d.ts +5108 -0
- package/dist/objects/generated/Items.js +4 -0
- package/dist/objects/generated/Runes.d.ts +1477 -0
- package/dist/objects/generated/Runes.js +13 -0
- package/dist/objects/generated/Spells.d.ts +208 -0
- package/dist/objects/generated/Spells.js +4 -0
- package/package.json +17 -15
- package/assets/constants/BootsItemNames.d.ts +0 -1
- package/assets/constants/BootsItemNames.js +0 -13
- package/assets/constants/LegendaryItemNames.d.ts +0 -4
- package/assets/constants/LegendaryItemNames.js +0 -125
- package/assets/constants/StatRunes.d.ts +0 -28
- package/assets/constants/StatRunes.js +0 -11
- package/assets/constants/StatRunesByRow.d.ts +0 -17
- package/assets/constants/StatRunesByRow.js +0 -17
- package/assets/constants/base/Champion.d.ts +0 -7903
- package/assets/constants/base/Champion.js +0 -1
- package/assets/constants/base/Item.d.ts +0 -21193
- package/assets/constants/base/Item.js +0 -1
- package/assets/constants/base/RunesReforged.d.ts +0 -491
- package/assets/constants/base/RunesReforged.js +0 -1
- package/assets/constants/base/Summoner.d.ts +0 -582
- package/assets/constants/base/Summoner.js +0 -1
- package/assets/index.d.ts +0 -4
- package/assets/index.js +0 -11
- package/assets/scripts/asset-scripts/champion.js +0 -10
- package/assets/scripts/asset-scripts/generate-all.d.ts +0 -4
- package/assets/scripts/asset-scripts/generate-all.js +0 -4
- package/assets/scripts/asset-scripts/item.d.ts +0 -1
- package/assets/scripts/asset-scripts/item.js +0 -10
- package/assets/scripts/asset-scripts/runes-reforged.d.ts +0 -1
- package/assets/scripts/asset-scripts/runes-reforged.js +0 -10
- package/assets/scripts/asset-scripts/summoner.d.ts +0 -1
- package/assets/scripts/asset-scripts/summoner.js +0 -10
- package/assets/scripts/constants/RuneIdComment.d.ts +0 -1
- package/assets/scripts/constants/RuneIdComment.js +0 -24
- package/assets/scripts/generate-all.d.ts +0 -23
- package/assets/scripts/generate-all.js +0 -27
- package/assets/scripts/generate-categorized-item-keys-num.d.ts +0 -1
- package/assets/scripts/generate-categorized-item-keys-num.js +0 -57
- package/assets/scripts/generate-categorized-item-keys.d.ts +0 -1
- package/assets/scripts/generate-categorized-item-keys.js +0 -59
- package/assets/scripts/generate-categorized-item-names.d.ts +0 -1
- package/assets/scripts/generate-categorized-item-names.js +0 -56
- package/assets/scripts/generate-champion-ids-by-name.d.ts +0 -1
- package/assets/scripts/generate-champion-ids-by-name.js +0 -17
- package/assets/scripts/generate-champion-ids.d.ts +0 -1
- package/assets/scripts/generate-champion-ids.js +0 -18
- package/assets/scripts/generate-champion-keys-num.d.ts +0 -1
- package/assets/scripts/generate-champion-keys-num.js +0 -20
- package/assets/scripts/generate-champion-keys.d.ts +0 -1
- package/assets/scripts/generate-champion-keys.js +0 -18
- package/assets/scripts/generate-champion-names.d.ts +0 -1
- package/assets/scripts/generate-champion-names.js +0 -18
- package/assets/scripts/generate-item-keys-num.d.ts +0 -1
- package/assets/scripts/generate-item-keys-num.js +0 -24
- package/assets/scripts/generate-item-keys.d.ts +0 -1
- package/assets/scripts/generate-item-keys.js +0 -22
- package/assets/scripts/generate-item-names.d.ts +0 -1
- package/assets/scripts/generate-item-names.js +0 -22
- package/assets/scripts/generate-non-stat-rune-ids-num.d.ts +0 -1
- package/assets/scripts/generate-non-stat-rune-ids-num.js +0 -21
- package/assets/scripts/generate-non-stat-rune-ids.d.ts +0 -1
- package/assets/scripts/generate-non-stat-rune-ids.js +0 -22
- package/assets/scripts/generate-non-stat-rune-names.d.ts +0 -1
- package/assets/scripts/generate-non-stat-rune-names.js +0 -20
- package/assets/scripts/generate-rune-ids.d.ts +0 -1
- package/assets/scripts/generate-rune-ids.js +0 -27
- package/assets/scripts/generate-rune-names.d.ts +0 -1
- package/assets/scripts/generate-rune-names.js +0 -25
- package/assets/scripts/generate-rune-picking-relationships.d.ts +0 -1
- package/assets/scripts/generate-rune-picking-relationships.js +0 -52
- package/assets/scripts/generate-rune-sets-by-rune-names-num.d.ts +0 -1
- package/assets/scripts/generate-rune-sets-by-rune-names-num.js +0 -121
- package/assets/scripts/generate-rune-sets-by-rune-names.d.ts +0 -1
- package/assets/scripts/generate-rune-sets-by-rune-names.js +0 -119
- package/assets/scripts/generate-rune-sets.d.ts +0 -1
- package/assets/scripts/generate-rune-sets.js +0 -116
- package/assets/scripts/generate-spell-ids-by-name.d.ts +0 -1
- package/assets/scripts/generate-spell-ids-by-name.js +0 -17
- package/assets/scripts/generate-spell-ids.d.ts +0 -1
- package/assets/scripts/generate-spell-ids.js +0 -18
- package/assets/scripts/generate-spell-keys-num.d.ts +0 -1
- package/assets/scripts/generate-spell-keys-num.js +0 -20
- package/assets/scripts/generate-spell-keys.d.ts +0 -1
- package/assets/scripts/generate-spell-keys.js +0 -18
- package/assets/scripts/generate-spell-names.d.ts +0 -1
- package/assets/scripts/generate-spell-names.js +0 -18
- package/assets/scripts/generate-stat-rune-ids.d.ts +0 -1
- package/assets/scripts/generate-stat-rune-ids.js +0 -18
- package/assets/scripts/generate-stat-rune-names.d.ts +0 -1
- package/assets/scripts/generate-stat-rune-names.js +0 -16
- package/assets/scripts/helpers/enableEscapedValues.d.ts +0 -15
- package/assets/scripts/helpers/enableEscapedValues.js +0 -34
- package/assets/scripts/helpers/generateIndexFile.d.ts +0 -1
- package/assets/scripts/helpers/generateIndexFile.js +0 -3
- package/assets/scripts/helpers/getExportStatement.d.ts +0 -6
- package/assets/scripts/helpers/getExportStatement.js +0 -37
- package/assets/scripts/helpers/getFmtdComment.d.ts +0 -5
- package/assets/scripts/helpers/getFmtdComment.js +0 -11
- package/assets/scripts/helpers/validateNumber.d.ts +0 -1
- package/assets/scripts/helpers/validateNumber.js +0 -6
- package/assets/scripts/helpers/writeToTmpFile.d.ts +0 -13
- package/assets/scripts/helpers/writeToTmpFile.js +0 -18
- package/assets/scripts/print-file-names.d.ts +0 -1
- package/assets/scripts/print-file-names.js +0 -89
- package/core/Locale.d.ts +0 -2
- package/core/PatchVersion.d.ts +0 -1
- package/core/PatchVersion.js +0 -1
- package/core/constants/Abilities.d.ts +0 -17
- package/core/constants/Abilities.js +0 -19
- package/core/constants/BuildingTypes.d.ts +0 -6
- package/core/constants/BuildingTypes.js +0 -7
- package/core/constants/Champions/ChampionIds.d.ts +0 -171
- package/core/constants/Champions/ChampionIds.js +0 -1
- package/core/constants/Champions/ChampionIdsByName.d.ts +0 -170
- package/core/constants/Champions/ChampionIdsByName.js +0 -1
- package/core/constants/Champions/ChampionKeys.d.ts +0 -171
- package/core/constants/Champions/ChampionKeys.js +0 -1
- package/core/constants/Champions/ChampionKeysNum.d.ts +0 -171
- package/core/constants/Champions/ChampionKeysNum.js +0 -1
- package/core/constants/Champions/ChampionNames.d.ts +0 -171
- package/core/constants/Champions/ChampionNames.js +0 -1
- package/core/constants/Continents.d.ts +0 -8
- package/core/constants/Continents.js +0 -9
- package/core/constants/DataDragonUrls.d.ts +0 -52
- package/core/constants/DataDragonUrls.js +0 -58
- package/core/constants/DragonTypes.d.ts +0 -11
- package/core/constants/DragonTypes.js +0 -12
- package/core/constants/GameModes.d.ts +0 -12
- package/core/constants/GameModes.js +0 -13
- package/core/constants/GameTypes.d.ts +0 -7
- package/core/constants/GameTypes.js +0 -8
- package/core/constants/Items/BootsItemKeys.d.ts +0 -14
- package/core/constants/Items/BootsItemKeys.js +0 -1
- package/core/constants/Items/BootsItemKeysNum.d.ts +0 -14
- package/core/constants/Items/BootsItemKeysNum.js +0 -1
- package/core/constants/Items/BootsItemNames.d.ts +0 -14
- package/core/constants/Items/BootsItemNames.js +0 -1
- package/core/constants/Items/ItemKeys.d.ts +0 -238
- package/core/constants/Items/ItemKeys.js +0 -1
- package/core/constants/Items/ItemKeysNum.d.ts +0 -238
- package/core/constants/Items/ItemKeysNum.js +0 -1
- package/core/constants/Items/ItemNames.d.ts +0 -244
- package/core/constants/Items/ItemNames.js +0 -1
- package/core/constants/Items/ItemTypes.d.ts +0 -7
- package/core/constants/Items/ItemTypes.js +0 -8
- package/core/constants/Items/LegendaryItemKeys.d.ts +0 -112
- package/core/constants/Items/LegendaryItemKeys.js +0 -1
- package/core/constants/Items/LegendaryItemKeysNum.d.ts +0 -112
- package/core/constants/Items/LegendaryItemKeysNum.js +0 -1
- package/core/constants/Items/LegendaryItemNames.d.ts +0 -112
- package/core/constants/Items/LegendaryItemNames.js +0 -1
- package/core/constants/KillTypes.d.ts +0 -7
- package/core/constants/KillTypes.js +0 -8
- package/core/constants/LaneTypes.d.ts +0 -7
- package/core/constants/LaneTypes.js +0 -8
- package/core/constants/Lanes.d.ts +0 -8
- package/core/constants/Lanes.js +0 -9
- package/core/constants/LeagueTexts.d.ts +0 -49
- package/core/constants/LeagueTexts.js +0 -54
- package/core/constants/Levels.d.ts +0 -22
- package/core/constants/Levels.js +0 -23
- package/core/constants/MapIds.d.ts +0 -17
- package/core/constants/MapIds.js +0 -18
- package/core/constants/MonsterTypes.d.ts +0 -8
- package/core/constants/MonsterTypes.js +0 -9
- package/core/constants/ParticipantIds.d.ts +0 -14
- package/core/constants/ParticipantIds.js +0 -15
- package/core/constants/PlatformApiUris.d.ts +0 -20
- package/core/constants/PlatformApiUris.js +0 -21
- package/core/constants/PlatformIds.d.ts +0 -23
- package/core/constants/PlatformIds.js +0 -26
- package/core/constants/Positions.d.ts +0 -9
- package/core/constants/Positions.js +0 -10
- package/core/constants/QueueIds.d.ts +0 -114
- package/core/constants/QueueIds.js +0 -140
- package/core/constants/QueueTypes.d.ts +0 -7
- package/core/constants/QueueTypes.js +0 -8
- package/core/constants/RankedRanks.d.ts +0 -8
- package/core/constants/RankedRanks.js +0 -9
- package/core/constants/RegionalApiUris.d.ts +0 -8
- package/core/constants/RegionalApiUris.js +0 -9
- package/core/constants/Regions.d.ts +0 -23
- package/core/constants/Regions.js +0 -26
- package/core/constants/RelativeTeams.d.ts +0 -6
- package/core/constants/RelativeTeams.js +0 -7
- package/core/constants/Roles.d.ts +0 -8
- package/core/constants/Roles.js +0 -9
- package/core/constants/Runes/NonStatRuneIds.d.ts +0 -85
- package/core/constants/Runes/NonStatRuneIds.js +0 -1
- package/core/constants/Runes/NonStatRuneIdsNum.d.ts +0 -63
- package/core/constants/Runes/NonStatRuneIdsNum.js +0 -1
- package/core/constants/Runes/NonStatRuneNames.d.ts +0 -63
- package/core/constants/Runes/NonStatRuneNames.js +0 -1
- package/core/constants/Runes/RuneIconFileNames.d.ts +0 -14
- package/core/constants/Runes/RuneIconFileNames.js +0 -97
- package/core/constants/Runes/RunePickingRelationships.d.ts +0 -74
- package/core/constants/Runes/RunePickingRelationships.js +0 -4
- package/core/constants/Runes/RuneSets.d.ts +0 -721
- package/core/constants/Runes/RuneSets.js +0 -11
- package/core/constants/Runes/RuneSetsByRuneNames.d.ts +0 -765
- package/core/constants/Runes/RuneSetsByRuneNames.js +0 -11
- package/core/constants/Runes/RuneSetsByRuneNamesNum.d.ts +0 -765
- package/core/constants/Runes/RuneSetsByRuneNamesNum.js +0 -11
- package/core/constants/Runes/RuneTreeIds.d.ts +0 -11
- package/core/constants/Runes/RuneTreeIds.js +0 -14
- package/core/constants/Runes/RuneTreeIdsNum.d.ts +0 -11
- package/core/constants/Runes/RuneTreeIdsNum.js +0 -14
- package/core/constants/Runes/RuneTreeNames.d.ts +0 -11
- package/core/constants/Runes/RuneTreeNames.js +0 -14
- package/core/constants/Runes/RuneTreeTypes.d.ts +0 -6
- package/core/constants/Runes/RuneTreeTypes.js +0 -7
- package/core/constants/SkillSlots.d.ts +0 -8
- package/core/constants/SkillSlots.js +0 -9
- package/core/constants/Skills.d.ts +0 -8
- package/core/constants/Skills.js +0 -9
- package/core/constants/Spells/SpellIds.d.ts +0 -21
- package/core/constants/Spells/SpellIds.js +0 -1
- package/core/constants/Spells/SpellIdsByName.d.ts +0 -18
- package/core/constants/Spells/SpellIdsByName.js +0 -1
- package/core/constants/Spells/SpellKeys.d.ts +0 -21
- package/core/constants/Spells/SpellKeys.js +0 -1
- package/core/constants/Spells/SpellKeysNum.d.ts +0 -21
- package/core/constants/Spells/SpellKeysNum.js +0 -1
- package/core/constants/Spells/SpellNames.d.ts +0 -21
- package/core/constants/Spells/SpellNames.js +0 -1
- package/core/constants/TeamIds.d.ts +0 -6
- package/core/constants/TeamIds.js +0 -7
- package/core/constants/TowerTypes.d.ts +0 -8
- package/core/constants/TowerTypes.js +0 -9
- package/core/constants/WardTypes.d.ts +0 -9
- package/core/constants/WardTypes.js +0 -10
- package/core/helpers/Champions/getChampionIdByKey.d.ts +0 -4
- package/core/helpers/Champions/getChampionIdByKey.js +0 -4
- package/core/helpers/Champions/getChampionIdByName.d.ts +0 -3
- package/core/helpers/Champions/getChampionIdByName.js +0 -4
- package/core/helpers/Champions/getChampionKeyById.d.ts +0 -3
- package/core/helpers/Champions/getChampionKeyById.js +0 -4
- package/core/helpers/Champions/getChampionKeyByName.d.ts +0 -3
- package/core/helpers/Champions/getChampionKeyByName.js +0 -5
- package/core/helpers/Champions/getChampionNameById.d.ts +0 -3
- package/core/helpers/Champions/getChampionNameById.js +0 -5
- package/core/helpers/Champions/getChampionNameByKey.d.ts +0 -4
- package/core/helpers/Champions/getChampionNameByKey.js +0 -4
- package/core/helpers/Champions/isChampionId.d.ts +0 -2
- package/core/helpers/Champions/isChampionId.js +0 -4
- package/core/helpers/Champions/isChampionKey.d.ts +0 -2
- package/core/helpers/Champions/isChampionKey.js +0 -4
- package/core/helpers/Champions/isChampionKeyNum.d.ts +0 -2
- package/core/helpers/Champions/isChampionKeyNum.js +0 -4
- package/core/helpers/Champions/isChampionName.d.ts +0 -2
- package/core/helpers/Champions/isChampionName.js +0 -4
- package/core/helpers/Items/getItemKeyByName.d.ts +0 -3
- package/core/helpers/Items/getItemKeyByName.js +0 -4
- package/core/helpers/Items/getItemKeyNumByName.d.ts +0 -3
- package/core/helpers/Items/getItemKeyNumByName.js +0 -4
- package/core/helpers/Items/getItemNameByKey.d.ts +0 -4
- package/core/helpers/Items/getItemNameByKey.js +0 -4
- package/core/helpers/Items/isBootsItemKey.d.ts +0 -2
- package/core/helpers/Items/isBootsItemKey.js +0 -4
- package/core/helpers/Items/isBootsItemKeyNum.d.ts +0 -2
- package/core/helpers/Items/isBootsItemKeyNum.js +0 -4
- package/core/helpers/Items/isBootsItemName.d.ts +0 -2
- package/core/helpers/Items/isBootsItemName.js +0 -4
- package/core/helpers/Items/isItemKey.d.ts +0 -2
- package/core/helpers/Items/isItemKey.js +0 -4
- package/core/helpers/Items/isItemKeyNum.d.ts +0 -2
- package/core/helpers/Items/isItemKeyNum.js +0 -4
- package/core/helpers/Items/isItemName.d.ts +0 -2
- package/core/helpers/Items/isItemName.js +0 -4
- package/core/helpers/Items/isLegendaryItemKey.d.ts +0 -2
- package/core/helpers/Items/isLegendaryItemKey.js +0 -4
- package/core/helpers/Items/isLegendaryItemKeyNum.d.ts +0 -2
- package/core/helpers/Items/isLegendaryItemKeyNum.js +0 -4
- package/core/helpers/Items/isLegendaryItemName.d.ts +0 -2
- package/core/helpers/Items/isLegendaryItemName.js +0 -4
- package/core/helpers/Items/isTier2Boots.d.ts +0 -3
- package/core/helpers/Items/isTier2Boots.js +0 -9
- package/core/helpers/Runes/getNonStatRuneIdByName.d.ts +0 -3
- package/core/helpers/Runes/getNonStatRuneIdByName.js +0 -4
- package/core/helpers/Runes/getNonStatRuneNameById.d.ts +0 -3
- package/core/helpers/Runes/getNonStatRuneNameById.js +0 -4
- package/core/helpers/Runes/getRuneCategoryName.d.ts +0 -4
- package/core/helpers/Runes/getRuneCategoryName.js +0 -16
- package/core/helpers/Runes/getRuneCdnUrl.d.ts +0 -3
- package/core/helpers/Runes/getRuneCdnUrl.js +0 -50
- package/core/helpers/Runes/getRuneIdByName.d.ts +0 -3
- package/core/helpers/Runes/getRuneIdByName.js +0 -4
- package/core/helpers/Runes/getRuneNameById.d.ts +0 -3
- package/core/helpers/Runes/getRuneNameById.js +0 -4
- package/core/helpers/Runes/getStatRuneIdByName.d.ts +0 -3
- package/core/helpers/Runes/getStatRuneIdByName.js +0 -4
- package/core/helpers/Runes/getStatRuneNameById.d.ts +0 -3
- package/core/helpers/Runes/getStatRuneNameById.js +0 -4
- package/core/helpers/Runes/isDominationRuneId.d.ts +0 -2
- package/core/helpers/Runes/isDominationRuneId.js +0 -4
- package/core/helpers/Runes/isDominationRuneIdNum.d.ts +0 -2
- package/core/helpers/Runes/isDominationRuneIdNum.js +0 -4
- package/core/helpers/Runes/isDominationRuneName.d.ts +0 -2
- package/core/helpers/Runes/isDominationRuneName.js +0 -4
- package/core/helpers/Runes/isInspirationRuneId.d.ts +0 -2
- package/core/helpers/Runes/isInspirationRuneId.js +0 -4
- package/core/helpers/Runes/isInspirationRuneIdNum.d.ts +0 -2
- package/core/helpers/Runes/isInspirationRuneIdNum.js +0 -4
- package/core/helpers/Runes/isInspirationRuneName.d.ts +0 -2
- package/core/helpers/Runes/isInspirationRuneName.js +0 -4
- package/core/helpers/Runes/isKeystoneRuneId.d.ts +0 -2
- package/core/helpers/Runes/isKeystoneRuneId.js +0 -4
- package/core/helpers/Runes/isKeystoneRuneIdNum.d.ts +0 -2
- package/core/helpers/Runes/isKeystoneRuneIdNum.js +0 -4
- package/core/helpers/Runes/isKeystoneRuneName.d.ts +0 -2
- package/core/helpers/Runes/isKeystoneRuneName.js +0 -4
- package/core/helpers/Runes/isNonStatRuneId.d.ts +0 -2
- package/core/helpers/Runes/isNonStatRuneId.js +0 -4
- package/core/helpers/Runes/isNonStatRuneIdNum.d.ts +0 -2
- package/core/helpers/Runes/isNonStatRuneIdNum.js +0 -4
- package/core/helpers/Runes/isNonStatRuneName.d.ts +0 -2
- package/core/helpers/Runes/isNonStatRuneName.js +0 -4
- package/core/helpers/Runes/isPrecisionRuneId.d.ts +0 -2
- package/core/helpers/Runes/isPrecisionRuneId.js +0 -4
- package/core/helpers/Runes/isPrecisionRuneIdNum.d.ts +0 -2
- package/core/helpers/Runes/isPrecisionRuneIdNum.js +0 -4
- package/core/helpers/Runes/isPrecisionRuneName.d.ts +0 -2
- package/core/helpers/Runes/isPrecisionRuneName.js +0 -4
- package/core/helpers/Runes/isResolveRuneId.d.ts +0 -2
- package/core/helpers/Runes/isResolveRuneId.js +0 -4
- package/core/helpers/Runes/isResolveRuneIdNum.d.ts +0 -2
- package/core/helpers/Runes/isResolveRuneIdNum.js +0 -4
- package/core/helpers/Runes/isResolveRuneName.d.ts +0 -2
- package/core/helpers/Runes/isResolveRuneName.js +0 -4
- package/core/helpers/Runes/isRuneId.d.ts +0 -2
- package/core/helpers/Runes/isRuneId.js +0 -4
- package/core/helpers/Runes/isRuneIdNum.d.ts +0 -2
- package/core/helpers/Runes/isRuneIdNum.js +0 -4
- package/core/helpers/Runes/isRuneName.d.ts +0 -2
- package/core/helpers/Runes/isRuneName.js +0 -4
- package/core/helpers/Runes/isSorceryRuneId.d.ts +0 -2
- package/core/helpers/Runes/isSorceryRuneId.js +0 -4
- package/core/helpers/Runes/isSorceryRuneIdNum.d.ts +0 -2
- package/core/helpers/Runes/isSorceryRuneIdNum.js +0 -4
- package/core/helpers/Runes/isSorceryRuneName.d.ts +0 -2
- package/core/helpers/Runes/isSorceryRuneName.js +0 -4
- package/core/helpers/Runes/isStatRuneId.d.ts +0 -2
- package/core/helpers/Runes/isStatRuneId.js +0 -4
- package/core/helpers/Runes/isStatRuneIdNum.d.ts +0 -2
- package/core/helpers/Runes/isStatRuneIdNum.js +0 -4
- package/core/helpers/Runes/isStatRuneName.d.ts +0 -2
- package/core/helpers/Runes/isStatRuneName.js +0 -4
- package/core/helpers/Spells/getSpellIdByKey.d.ts +0 -4
- package/core/helpers/Spells/getSpellIdByKey.js +0 -4
- package/core/helpers/Spells/getSpellIdByName.d.ts +0 -3
- package/core/helpers/Spells/getSpellIdByName.js +0 -4
- package/core/helpers/Spells/getSpellKeyById.d.ts +0 -3
- package/core/helpers/Spells/getSpellKeyById.js +0 -4
- package/core/helpers/Spells/getSpellKeyByName.d.ts +0 -3
- package/core/helpers/Spells/getSpellKeyByName.js +0 -5
- package/core/helpers/Spells/getSpellNameById.d.ts +0 -3
- package/core/helpers/Spells/getSpellNameById.js +0 -5
- package/core/helpers/Spells/getSpellNameByKey.d.ts +0 -4
- package/core/helpers/Spells/getSpellNameByKey.js +0 -4
- package/core/helpers/Spells/isSpellId.d.ts +0 -2
- package/core/helpers/Spells/isSpellId.js +0 -4
- package/core/helpers/Spells/isSpellKey.d.ts +0 -2
- package/core/helpers/Spells/isSpellKey.js +0 -4
- package/core/helpers/Spells/isSpellKeyNum.d.ts +0 -2
- package/core/helpers/Spells/isSpellKeyNum.js +0 -4
- package/core/helpers/Spells/isSpellName.d.ts +0 -2
- package/core/helpers/Spells/isSpellName.js +0 -4
- package/core/helpers/getPositionImageUrl.d.ts +0 -2
- package/core/helpers/getPositionImageUrl.js +0 -11
- package/core/helpers/isRiotId.d.ts +0 -5
- package/core/helpers/isRiotId.js +0 -15
- package/core/helpers/makeRiotId.d.ts +0 -4
- package/core/helpers/makeRiotId.js +0 -5
- package/core/helpers/splitRiotId.d.ts +0 -10
- package/core/helpers/splitRiotId.js +0 -16
- package/core/index.d.ts +0 -139
- package/core/index.js +0 -150
- package/core/types/championJson.d.ts +0 -85
- package/core/types/championJson.js +0 -1
- package/core/types/interfaces.d.ts +0 -22
- package/core/types/interfaces.js +0 -1
- package/core/types/types.d.ts +0 -268
- package/core/types/types.js +0 -1
- /package/{core → dist}/Locale.js +0 -0
- /package/{assets/scripts/asset-scripts/champion.d.ts → dist/helpers/type.js} +0 -0
package/README.md
CHANGED
@@ -1,28 +1,130 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
1
|
+
# lol-constants
|
2
|
+
Provides constants, helper functions, types (and type validator functions) for League of Legends game data, primarily in the context of [Riot API](https://developer.riotgames.com/docs/lol).
|
3
|
+
|
4
|
+
In this library, you will find the main advantage to be: the ability to ‘convert’ between **Keys**, **IDs**, and **Names** of various game objects, namely champions, items, runes, and spells. Here's an example:
|
5
|
+
|
6
|
+
```typescript
|
7
|
+
import {lol} from 'lol-constants'
|
8
|
+
|
9
|
+
let championName = 'Wukong'
|
10
|
+
|
11
|
+
lol.champion.get(championName).id // 62
|
12
|
+
lol.champion.get(championName).key // 'MonkeyKing'
|
13
|
+
lol.champion.get(championName).name // 'Wukong'
|
14
|
+
|
15
|
+
/* Alternatively... */
|
16
|
+
|
17
|
+
import {getChampion} from 'lol-constants'
|
18
|
+
|
19
|
+
getChampion(championName).id // 62
|
20
|
+
getChampion(championName).key // 'MonkeyKing'
|
21
|
+
getChampion(championName).name // 'Wukong'
|
22
|
+
|
23
|
+
```
|
24
|
+
|
25
|
+
That's not all. Such a getter function is also designed to be able to accept not only names, but also keys and ids. Here's how:
|
26
|
+
|
27
|
+
```typescript
|
28
|
+
import {getRune} from 'lol-constants'
|
29
|
+
|
30
|
+
let runeName = 'Cosmic Insight'
|
31
|
+
let runeKey = 'CosmicInsight'
|
32
|
+
let runeId = 8347
|
33
|
+
|
34
|
+
getRune(runeName) // ..
|
35
|
+
getRune(runeKey) // ..
|
36
|
+
getRune(runeId) // ..
|
37
|
+
// All return the same rune object: {id: 8347, key: 'CosmicInsight', name: 'Cosmic Insight', ...}
|
38
|
+
|
39
|
+
```
|
40
|
+
|
41
|
+
This paradigm applies to **4** game areas: champions, items, runes (including stat runes and rune trees), and spells. Functions: `getChampion`, `getItem`, `getRune` (plus `getStatRune` and `getRuneTree`), and `getSpell`. Plus a few other areas.
|
42
|
+
|
43
|
+
Constants
|
44
|
+
---
|
45
|
+
Whilst working with the Riot API, you will encounter many fields which have an exact type of value. As the library name suggests, these constants are a core part of it. So are their types and type validation functions which arise from each constant, like so:
|
46
|
+
|
47
|
+
```typescript
|
48
|
+
const DragonTypes = {...}
|
49
|
+
type DragonType // "EARTH_DRAGON" | "CHEMTECH_DRAGON" | "AIR_DRAGON" | "HEXTECH_DRAGON" | "WATER_DRAGON" | "FIRE_DRAGON" | "ELDER_DRAGON"
|
50
|
+
function isDragonType(type: string): type is DragonType {...}
|
51
|
+
```
|
52
|
+
See [actual code behind this constant](./src/constants/events.ts)\
|
53
|
+
See [type validator usage example](./examples/type-validator-fn-example.ts)
|
54
|
+
|
55
|
+
**Armed with these tools, you may effectively and fearlessly use types in your interfaces or elsewhere.**
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
# Why the `lol` object?
|
60
|
+
In part, it is meant to be an introductory entry point object for the library. You can explore all the different amenities this library provides without a hassle of looking for them outside of your code editor. When you have discovered a certain method, such as `lol.region.get`, you may start using its shorthand function, in this case `getRegion`. Additionally, you may look into the [examples file](./examples/examples-with-lol.ts) for all equivalents laid out.
|
61
|
+
|
62
|
+
**Anything that you may find in the `lol` object can also be imported as a standalone constant, enum, or function.**
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
# Key, ID, Name
|
67
|
+
While the various JSONs provided by [DataDragon](https://developer.riotgames.com/docs/lol#data-dragon), such as [`champion.json`](http://ddragon.leagueoflegends.com/cdn/14.19.1/data/en_US/champion.json) or [`runesReforged.json`](http://ddragon.leagueoflegends.com/cdn/14.19.1/data/en_US/runesReforged.json) and so on, organize keys, ids, and names haphazardly, `lol-constants` offers a simpler approach that relies on the following principles:
|
68
|
+
| | |
|
69
|
+
| --- | --- |
|
70
|
+
| **ID** | Numerical identifier *(primary entry point)* |
|
71
|
+
| **Key** | Alias or reference *(secondary entry point)* |
|
72
|
+
| **Name** | Display name of artifact *(user-friendly)* |
|
73
|
+
|
74
|
+
Examples
|
75
|
+
---
|
76
|
+
|
77
|
+
| Category | ID | Key | Name | `lol` getter | standalone |
|
78
|
+
| ---: | :---: | :---: | :---: | :--- | :--- |
|
79
|
+
| Champion | `62` | `'MonkeyKing'` | `'Wukong'` | `lol.champion.get` | `getChampion` |
|
80
|
+
| Item | `1038` | n/a | `'B. F. Sword'` | `lol.item.get` | `getItem` |
|
81
|
+
| Rune | `8347` | `'CosmicInsight'` | `'Cosmic Insight'` | `lol.rune.get` | `getRune` |
|
82
|
+
| Spell | `4` | `'SummonerFlash'` | `'Flash'` | `lol.spell.get` | `getSpell` |
|
83
|
+
| ———— | | | |
|
84
|
+
| Stat Rune | `5008` | n/a | `'Adaptive Force'` | `lol.rune.stat.get` | `getStatRune` |
|
85
|
+
| Rune Tree | `8000` | `'Precision'` | `'Precision'` | `lol.rune.tree.get` | `getRuneTree` |
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
# Types
|
90
|
+
|
91
|
+
If you're working with TypeScript, you're gonna want types. Here are some useful types that are exported from the library:
|
92
|
+
|
93
|
+
```typescript
|
94
|
+
import {
|
95
|
+
// ### Basic constants
|
96
|
+
MonsterType, // "HORDE" | "DRAGON" | "RIFTHERALD" | "BARON_NASHOR"
|
97
|
+
DragonType, // "EARTH_DRAGON" | "CHEMTECH_DRAGON" | "AIR_DRAGON" | ...
|
98
|
+
KillType, // "KILL_FIRST_BLOOD" | "KILL_MULTI" | "KILL_ACE"
|
99
|
+
BuildingType, // "TOWER_BUILDING" | "INHIBITOR_BUILDING"
|
100
|
+
TowerType, // "OUTER_TURRET" | "INNER_TURRET" | "BASE_TURRET" | "NEXUS_TURRET"
|
101
|
+
RankedTier, // "CHALLENGER" | "GRANDMASTER" | "MASTER" | "DIAMOND" | ...
|
102
|
+
RankedRank, // "I" | "II" | "III" | "IV"
|
103
|
+
Locale, // "cs_CZ" | "el_GR" | "pl_PL" | "ro_RO" | "en_GB" | ...
|
104
|
+
Position, // "TOP" | "JUNGLE" | "MIDDLE" | "BOTTOM" | "UTILITY"
|
105
|
+
// etc.
|
106
|
+
// ### Maps, Queues, Regions
|
107
|
+
QueueId, // 0 | 420 | 2010 | 2020 | 400 | 430 | 440 | 450 | 700 | ...
|
108
|
+
Platform, // "BR1" | "EUN1" | "EUW1" | "JP1" | "KR" | "LA1" | "LA2" | ...
|
109
|
+
Region, // "BR" | "EUNE" | "EUW" | "JP" | "KR" | "LAN" | "LAS" | ...
|
110
|
+
// ### Champions, Items, Runes, Spells
|
111
|
+
ChampionId, // 1 | 2 | 3 | 11 | 12 | 13 | 4 | 5 | 6 | 7 | 8 | 9 | ...
|
112
|
+
ChampionName, // "Annie" | "Olaf" | "Galio" | "Twisted Fate" | "Xin Zhao" | ...
|
113
|
+
ItemId, // 1001 | 1004 | 1006 | 1011 | 1018 | 1026 | 1027 | 1028 | ...
|
114
|
+
ItemName, // "Boots" | "Faerie Charm" | "Rejuvenation Bead" | "Giant's Belt" | ...
|
115
|
+
RuneId, // 8005 | 8021 | 8010 | 8009 | 9101 | 9111 | 8014 | 8017 | ...
|
116
|
+
RuneName, // "Press the Attack" | "Presence of Mind" | "Conqueror" | ...
|
117
|
+
SpellId, // 1 | 3 | 11 | 12 | 13 | 4 | 6 | 7 | 14 | 21 | 30 | 31 | ...
|
118
|
+
SpellName, // "Cleanse" | "Exhaust" | "Flash" | "Ghost" | "Heal" | ...
|
119
|
+
} from 'lol-constants'
|
120
|
+
```
|
121
|
+
|
122
|
+
More types can be found here: [examples/](./examples/)
|
123
|
+
|
124
|
+
# Future plans
|
125
|
+
Besides being an easy-to-update library with each League patch and to stay updated whenever a new patch does come out, there are several areas of interest for this library moving forward:
|
126
|
+
+ Provide tools (functions and such) for front-end work: getting icons and such.
|
127
|
+
+ Enable total backwards compatibility with older patches (i.e. no missing items or something for last couple of patches, preferrably two years, which is the limit set by Riot API)
|
128
|
+
+ Fulfill any missing types and constants within the context of Riot API. Perhaps provide interfaces for Riot API responses.
|
129
|
+
+ More detailed champions, items, runes, and spells information. Would require creating an own database of those instead of relying on DataDragon.
|
130
|
+
+ Optimized library size/splitting (currently library should be around ~100KB).
|
package/dist/Locale.d.ts
ADDED
package/dist/Patch.d.ts
ADDED
package/dist/Patch.js
ADDED
@@ -14,4 +14,4 @@ export declare const ChampionClasses: {
|
|
14
14
|
readonly Specialist: "Specialist";
|
15
15
|
};
|
16
16
|
export type ChampionClass = typeof ChampionClasses[keyof typeof ChampionClasses];
|
17
|
-
export declare function isChampionClass(
|
17
|
+
export declare function isChampionClass(title: string | null | undefined): title is ChampionClass;
|
@@ -20,6 +20,6 @@ export const ChampionClasses = {
|
|
20
20
|
// # Specialist
|
21
21
|
'Specialist': 'Specialist',
|
22
22
|
};
|
23
|
-
export function isChampionClass(
|
24
|
-
return typeof
|
23
|
+
export function isChampionClass(title) {
|
24
|
+
return typeof title == 'string' && title in ChampionClasses;
|
25
25
|
}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
export declare const MonsterTypes: {
|
2
|
+
readonly HORDE: "HORDE";
|
3
|
+
readonly DRAGON: "DRAGON";
|
4
|
+
readonly RIFTHERALD: "RIFTHERALD";
|
5
|
+
readonly BARON_NASHOR: "BARON_NASHOR";
|
6
|
+
};
|
7
|
+
export type MonsterType = typeof MonsterTypes[keyof typeof MonsterTypes];
|
8
|
+
export declare function isMonsterType(type: string | null | undefined): type is MonsterType;
|
9
|
+
export declare const DragonTypes: {
|
10
|
+
readonly EARTH_DRAGON: "EARTH_DRAGON";
|
11
|
+
readonly CHEMTECH_DRAGON: "CHEMTECH_DRAGON";
|
12
|
+
readonly AIR_DRAGON: "AIR_DRAGON";
|
13
|
+
readonly HEXTECH_DRAGON: "HEXTECH_DRAGON";
|
14
|
+
readonly WATER_DRAGON: "WATER_DRAGON";
|
15
|
+
readonly FIRE_DRAGON: "FIRE_DRAGON";
|
16
|
+
readonly ELDER_DRAGON: "ELDER_DRAGON";
|
17
|
+
};
|
18
|
+
export type DragonType = typeof DragonTypes[keyof typeof DragonTypes];
|
19
|
+
export declare function isDragonType(type: string | null | undefined): type is DragonType;
|
20
|
+
export declare const KillTypes: {
|
21
|
+
readonly KILL_FIRST_BLOOD: "KILL_FIRST_BLOOD";
|
22
|
+
readonly KILL_MULTI: "KILL_MULTI";
|
23
|
+
readonly KILL_ACE: "KILL_ACE";
|
24
|
+
};
|
25
|
+
export type KillType = typeof KillTypes[keyof typeof KillTypes];
|
26
|
+
export declare function isKillType(type: string | null | undefined): type is KillType;
|
27
|
+
export declare const BuildingTypes: {
|
28
|
+
readonly TOWER_BUILDING: "TOWER_BUILDING";
|
29
|
+
readonly INHIBITOR_BUILDING: "INHIBITOR_BUILDING";
|
30
|
+
};
|
31
|
+
export type BuildingType = typeof BuildingTypes[keyof typeof BuildingTypes];
|
32
|
+
export declare function isBuildingType(type: string | null | undefined): type is BuildingType;
|
33
|
+
export declare const TowerTypes: {
|
34
|
+
readonly OUTER_TURRET: "OUTER_TURRET";
|
35
|
+
readonly INNER_TURRET: "INNER_TURRET";
|
36
|
+
readonly BASE_TURRET: "BASE_TURRET";
|
37
|
+
readonly NEXUS_TURRET: "NEXUS_TURRET";
|
38
|
+
};
|
39
|
+
export type TowerType = typeof TowerTypes[keyof typeof TowerTypes];
|
40
|
+
export declare function isTowerType(type: string | null | undefined): type is TowerType;
|
41
|
+
export declare const WardTypes: {
|
42
|
+
readonly UNDEFINED: "UNDEFINED";
|
43
|
+
readonly YELLOW_TRINKET: "YELLOW_TRINKET";
|
44
|
+
readonly CONTROL_WARD: "CONTROL_WARD";
|
45
|
+
readonly SIGHT_WARD: "SIGHT_WARD";
|
46
|
+
readonly BLUE_TRINKET: "BLUE_TRINKET";
|
47
|
+
};
|
48
|
+
export type WardType = typeof WardTypes[keyof typeof WardTypes];
|
49
|
+
export declare function isWardType(type: string | null | undefined): type is WardType;
|
@@ -0,0 +1,55 @@
|
|
1
|
+
export const MonsterTypes = {
|
2
|
+
'HORDE': 'HORDE',
|
3
|
+
'DRAGON': 'DRAGON',
|
4
|
+
'RIFTHERALD': 'RIFTHERALD',
|
5
|
+
'BARON_NASHOR': 'BARON_NASHOR',
|
6
|
+
};
|
7
|
+
export function isMonsterType(type) {
|
8
|
+
return typeof type == 'string' && type in MonsterTypes;
|
9
|
+
}
|
10
|
+
export const DragonTypes = {
|
11
|
+
'EARTH_DRAGON': 'EARTH_DRAGON',
|
12
|
+
'CHEMTECH_DRAGON': 'CHEMTECH_DRAGON',
|
13
|
+
'AIR_DRAGON': 'AIR_DRAGON',
|
14
|
+
'HEXTECH_DRAGON': 'HEXTECH_DRAGON',
|
15
|
+
'WATER_DRAGON': 'WATER_DRAGON',
|
16
|
+
'FIRE_DRAGON': 'FIRE_DRAGON',
|
17
|
+
'ELDER_DRAGON': 'ELDER_DRAGON',
|
18
|
+
};
|
19
|
+
export function isDragonType(type) {
|
20
|
+
return typeof type == 'string' && type in DragonTypes;
|
21
|
+
}
|
22
|
+
export const KillTypes = {
|
23
|
+
'KILL_FIRST_BLOOD': 'KILL_FIRST_BLOOD',
|
24
|
+
'KILL_MULTI': 'KILL_MULTI',
|
25
|
+
'KILL_ACE': 'KILL_ACE',
|
26
|
+
};
|
27
|
+
export function isKillType(type) {
|
28
|
+
return typeof type == 'string' && type in KillTypes;
|
29
|
+
}
|
30
|
+
export const BuildingTypes = {
|
31
|
+
'TOWER_BUILDING': 'TOWER_BUILDING',
|
32
|
+
'INHIBITOR_BUILDING': 'INHIBITOR_BUILDING',
|
33
|
+
};
|
34
|
+
export function isBuildingType(type) {
|
35
|
+
return typeof type == 'string' && type in BuildingTypes;
|
36
|
+
}
|
37
|
+
export const TowerTypes = {
|
38
|
+
'OUTER_TURRET': 'OUTER_TURRET',
|
39
|
+
'INNER_TURRET': 'INNER_TURRET',
|
40
|
+
'BASE_TURRET': 'BASE_TURRET',
|
41
|
+
'NEXUS_TURRET': 'NEXUS_TURRET',
|
42
|
+
};
|
43
|
+
export function isTowerType(type) {
|
44
|
+
return typeof type == 'string' && type in TowerTypes;
|
45
|
+
}
|
46
|
+
export const WardTypes = {
|
47
|
+
'UNDEFINED': 'UNDEFINED',
|
48
|
+
'YELLOW_TRINKET': 'YELLOW_TRINKET',
|
49
|
+
'CONTROL_WARD': 'CONTROL_WARD',
|
50
|
+
'SIGHT_WARD': 'SIGHT_WARD',
|
51
|
+
'BLUE_TRINKET': 'BLUE_TRINKET',
|
52
|
+
};
|
53
|
+
export function isWardType(type) {
|
54
|
+
return typeof type == 'string' && type in WardTypes;
|
55
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
export declare const QueueTypes: {
|
2
|
+
readonly RANKED_SOLO_5x5: "RANKED_SOLO_5x5";
|
3
|
+
readonly RANKED_FLEX_SR: "RANKED_FLEX_SR";
|
4
|
+
readonly RANKED_TFT: "RANKED_TFT";
|
5
|
+
};
|
6
|
+
export type QueueType = typeof QueueTypes[keyof typeof QueueTypes];
|
7
|
+
export declare function isQueueType(type: string | null | undefined): type is QueueType;
|
8
|
+
export declare const GameModes: {
|
9
|
+
readonly CLASSIC: "CLASSIC";
|
10
|
+
readonly ARAM: "ARAM";
|
11
|
+
readonly TUTORIAL: "TUTORIAL";
|
12
|
+
readonly URF: "URF";
|
13
|
+
readonly ONEFORALL: "ONEFORALL";
|
14
|
+
readonly KINGPORO: "KINGPORO";
|
15
|
+
readonly GAMEMODEX: "GAMEMODEX";
|
16
|
+
readonly ULTBOOK: "ULTBOOK";
|
17
|
+
};
|
18
|
+
export type GameMode = typeof GameModes[keyof typeof GameModes];
|
19
|
+
export declare function isGameMode(mode: string | null | undefined): mode is GameMode;
|
20
|
+
export declare const GameTypes: {
|
21
|
+
readonly CUSTOM_GAME: "CUSTOM_GAME";
|
22
|
+
readonly TUTORIAL_GAME: "TUTORIAL_GAME";
|
23
|
+
readonly MATCHED_GAME: "MATCHED_GAME";
|
24
|
+
};
|
25
|
+
export type GameType = typeof GameTypes[keyof typeof GameTypes];
|
26
|
+
export declare function isGameType(type: string | null | undefined): type is GameType;
|
@@ -0,0 +1,29 @@
|
|
1
|
+
export const QueueTypes = {
|
2
|
+
'RANKED_SOLO_5x5': 'RANKED_SOLO_5x5',
|
3
|
+
'RANKED_FLEX_SR': 'RANKED_FLEX_SR',
|
4
|
+
'RANKED_TFT': 'RANKED_TFT',
|
5
|
+
};
|
6
|
+
export function isQueueType(type) {
|
7
|
+
return typeof type == 'string' && type in QueueTypes;
|
8
|
+
}
|
9
|
+
export const GameModes = {
|
10
|
+
'CLASSIC': 'CLASSIC',
|
11
|
+
'ARAM': 'ARAM',
|
12
|
+
'TUTORIAL': 'TUTORIAL',
|
13
|
+
'URF': 'URF',
|
14
|
+
'ONEFORALL': 'ONEFORALL',
|
15
|
+
'KINGPORO': 'KINGPORO',
|
16
|
+
'GAMEMODEX': 'GAMEMODEX',
|
17
|
+
'ULTBOOK': 'ULTBOOK',
|
18
|
+
};
|
19
|
+
export function isGameMode(mode) {
|
20
|
+
return typeof mode == 'string' && mode in GameModes;
|
21
|
+
}
|
22
|
+
export const GameTypes = {
|
23
|
+
'CUSTOM_GAME': 'CUSTOM_GAME',
|
24
|
+
'TUTORIAL_GAME': 'TUTORIAL_GAME',
|
25
|
+
'MATCHED_GAME': 'MATCHED_GAME',
|
26
|
+
};
|
27
|
+
export function isGameType(type) {
|
28
|
+
return typeof type == 'string' && type in GameTypes;
|
29
|
+
}
|
@@ -11,4 +11,12 @@ export declare const RankedTiers: {
|
|
11
11
|
readonly IRON: "IRON";
|
12
12
|
};
|
13
13
|
export type RankedTier = typeof RankedTiers[keyof typeof RankedTiers];
|
14
|
-
export declare function isRankedTier(
|
14
|
+
export declare function isRankedTier(tier: string | null | undefined): tier is RankedTier;
|
15
|
+
export declare const RankedRanks: {
|
16
|
+
readonly I: "I";
|
17
|
+
readonly II: "II";
|
18
|
+
readonly III: "III";
|
19
|
+
readonly IV: "IV";
|
20
|
+
};
|
21
|
+
export type RankedRank = typeof RankedRanks[keyof typeof RankedRanks];
|
22
|
+
export declare function isRankedRank(rank: string | null | undefined): rank is RankedRank;
|
@@ -10,6 +10,15 @@ export const RankedTiers = {
|
|
10
10
|
'BRONZE': 'BRONZE',
|
11
11
|
'IRON': 'IRON',
|
12
12
|
};
|
13
|
-
export function isRankedTier(
|
14
|
-
return typeof
|
13
|
+
export function isRankedTier(tier) {
|
14
|
+
return typeof tier == 'string' && tier in RankedTiers;
|
15
|
+
}
|
16
|
+
export const RankedRanks = {
|
17
|
+
'I': 'I',
|
18
|
+
'II': 'II',
|
19
|
+
'III': 'III',
|
20
|
+
'IV': 'IV',
|
21
|
+
};
|
22
|
+
export function isRankedRank(rank) {
|
23
|
+
return typeof rank == 'string' && rank in RankedRanks;
|
15
24
|
}
|
@@ -57,4 +57,4 @@ export declare const Locales: {
|
|
57
57
|
readonly zh_TW: "zh_TW";
|
58
58
|
};
|
59
59
|
export type Locale = typeof Locales[keyof typeof Locales];
|
60
|
-
export declare function isLocale(
|
60
|
+
export declare function isLocale(locale: string | null | undefined): locale is Locale;
|
@@ -56,6 +56,6 @@ export const Locales = {
|
|
56
56
|
/** Chinese (Taiwan) */
|
57
57
|
'zh_TW': 'zh_TW',
|
58
58
|
};
|
59
|
-
export function isLocale(
|
60
|
-
return typeof
|
59
|
+
export function isLocale(locale) {
|
60
|
+
return typeof locale == 'string' && locale in Locales;
|
61
61
|
}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
export declare const Positions: {
|
2
|
+
readonly TOP: "TOP";
|
3
|
+
readonly JUNGLE: "JUNGLE";
|
4
|
+
readonly MIDDLE: "MIDDLE";
|
5
|
+
readonly BOTTOM: "BOTTOM";
|
6
|
+
readonly UTILITY: "UTILITY";
|
7
|
+
};
|
8
|
+
export type Position = typeof Positions[keyof typeof Positions];
|
9
|
+
export declare function isPosition(position: string | null | undefined): position is Position;
|
10
|
+
export declare const Roles: {
|
11
|
+
readonly NONE: "NONE";
|
12
|
+
readonly SOLO: "SOLO";
|
13
|
+
readonly CARRY: "CARRY";
|
14
|
+
readonly SUPPORT: "SUPPORT";
|
15
|
+
};
|
16
|
+
export type Role = typeof Roles[keyof typeof Roles];
|
17
|
+
export declare function isRole(role: string | null | undefined): role is Role;
|
18
|
+
export declare const Lanes: {
|
19
|
+
readonly TOP: "TOP";
|
20
|
+
readonly JUNGLE: "JUNGLE";
|
21
|
+
readonly MIDDLE: "MIDDLE";
|
22
|
+
readonly BOTTOM: "BOTTOM";
|
23
|
+
};
|
24
|
+
export type Lane = typeof Lanes[keyof typeof Lanes];
|
25
|
+
export declare function isLane(lane: string | null | undefined): lane is Lane;
|
26
|
+
export declare const LaneTypes: {
|
27
|
+
readonly TOP_LANE: "TOP_LANE";
|
28
|
+
readonly MID_LANE: "MID_LANE";
|
29
|
+
readonly BOT_LANE: "BOT_LANE";
|
30
|
+
};
|
31
|
+
export type LaneType = typeof LaneTypes[keyof typeof LaneTypes];
|
32
|
+
export declare function isLaneType(type: string | null | undefined): type is LaneType;
|
33
|
+
export declare const TeamIds: {
|
34
|
+
readonly 100: 100;
|
35
|
+
readonly 200: 200;
|
36
|
+
};
|
37
|
+
export type TeamId = typeof TeamIds[keyof typeof TeamIds];
|
38
|
+
export declare function isTeamId(id: number | null | undefined): id is TeamId;
|
@@ -0,0 +1,43 @@
|
|
1
|
+
export const Positions = {
|
2
|
+
'TOP': 'TOP',
|
3
|
+
'JUNGLE': 'JUNGLE',
|
4
|
+
'MIDDLE': 'MIDDLE',
|
5
|
+
'BOTTOM': 'BOTTOM',
|
6
|
+
'UTILITY': 'UTILITY',
|
7
|
+
};
|
8
|
+
export function isPosition(position) {
|
9
|
+
return typeof position == 'string' && position in Positions;
|
10
|
+
}
|
11
|
+
export const Roles = {
|
12
|
+
'NONE': 'NONE',
|
13
|
+
'SOLO': 'SOLO',
|
14
|
+
'CARRY': 'CARRY',
|
15
|
+
'SUPPORT': 'SUPPORT',
|
16
|
+
};
|
17
|
+
export function isRole(role) {
|
18
|
+
return typeof role == 'string' && role in Roles;
|
19
|
+
}
|
20
|
+
export const Lanes = {
|
21
|
+
'TOP': 'TOP',
|
22
|
+
'JUNGLE': 'JUNGLE',
|
23
|
+
'MIDDLE': 'MIDDLE',
|
24
|
+
'BOTTOM': 'BOTTOM',
|
25
|
+
};
|
26
|
+
export function isLane(lane) {
|
27
|
+
return typeof lane == 'string' && lane in Lanes;
|
28
|
+
}
|
29
|
+
export const LaneTypes = {
|
30
|
+
'TOP_LANE': 'TOP_LANE',
|
31
|
+
'MID_LANE': 'MID_LANE',
|
32
|
+
'BOT_LANE': 'BOT_LANE',
|
33
|
+
};
|
34
|
+
export function isLaneType(type) {
|
35
|
+
return typeof type == 'string' && type in LaneTypes;
|
36
|
+
}
|
37
|
+
export const TeamIds = {
|
38
|
+
100: 100,
|
39
|
+
200: 200,
|
40
|
+
};
|
41
|
+
export function isTeamId(id) {
|
42
|
+
return typeof id == 'number' && id in TeamIds;
|
43
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
export declare const ItemSrTypes: {
|
2
|
+
readonly STARTER: 0;
|
3
|
+
readonly BASIC: 1;
|
4
|
+
readonly EPIC: 2;
|
5
|
+
readonly LEGENDARY: 3;
|
6
|
+
readonly TRINKET: 11;
|
7
|
+
readonly BOOTS: 12;
|
8
|
+
readonly CONSUMABLE: 13;
|
9
|
+
readonly MISC: -1;
|
10
|
+
};
|
11
|
+
export type ItemSrType = typeof ItemSrTypes[keyof typeof ItemSrTypes];
|