當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript Generators.tuple函數代碼示例

本文整理匯總了TypeScript中utilities/iterable/Generators.tuple函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript tuple函數的具體用法?TypeScript tuple怎麽用?TypeScript tuple使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了tuple函數的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: pipe

				.setRefreshMethod(() => ({
					defaultOption: ItemType.None,
					options: pipe(tuple(ItemType.None, Translation.nameOf(Dictionary.Item, ItemType.None, false).inContext(TextContext.Title)))
						.include(Enums.values(ItemType)
							.filter(item => item)
							.map(item => tuple(item, Translation.nameOf(Dictionary.Item, item, false).inContext(TextContext.Title)))
							.collect(Collectors.toArray)
							.sort(([, t1], [, t2]) => Text.toString(t1).localeCompare(Text.toString(t2)))
							.values())
						.map(([id, t]) => tuple(id, (option: Button) => option.setText(t))),
				}))
開發者ID:WaywardGame,項目名稱:developertools,代碼行數:11,代碼來源:AddItemToInventory.ts

示例2: tuple

						.map(([id, t]) => tuple(id, (option: Button) => option.setText(t)))),
開發者ID:WaywardGame,項目名稱:developertools,代碼行數:1,代碼來源:NPC.ts

示例3: tuple

						.map(terrain => tuple(
							TerrainType[terrain] as keyof typeof TerrainType,
							new Translation(Dictionary.Terrain, terrain).inContext(TextContext.Title),
						))
開發者ID:WaywardGame,項目名稱:developertools,代碼行數:4,代碼來源:Terrain.ts

示例4: tuple

						.map(doodad => tuple(
							DoodadType[doodad] as keyof typeof DoodadType,
							Translation.nameOf(Dictionary.Doodad, doodad, false).inContext(TextContext.Title),
						))
開發者ID:WaywardGame,項目名稱:developertools,代碼行數:4,代碼來源:Doodad.ts

示例5: tuple

						.map(creature => tuple(
							CreatureType[creature] as keyof typeof CreatureType,
							Translation.nameOf(Dictionary.Creature, creature, false).inContext(TextContext.Title)
								.setFailWith(corpseManager.getName(creature, false).inContext(TextContext.Title)),
						))
開發者ID:WaywardGame,項目名稱:developertools,代碼行數:5,代碼來源:Corpse.ts

示例6: tuple

				.map(difficulty => tuple(Difficulty[difficulty], {
					translation: new Translation(BalancingTools.INSTANCE.dictionaryDifficulty, difficulty),
					onActivate: () => this.setDifficulty(difficulty)
				})))
開發者ID:WaywardGame,項目名稱:balancingtools,代碼行數:4,代碼來源:BalancingToolsPanel.ts

示例7: tuple

							.map(event => tuple(
								TileEventType[event] as keyof typeof TileEventType,
								Translation.nameOf(Dictionary.TileEvent, event, false).inContext(TextContext.Title),
							))
開發者ID:WaywardGame,項目名稱:developertools,代碼行數:4,代碼來源:TileEvent.ts

示例8: tuple

						.map(particle => tuple(particle, Translation.generator(ParticleType[particle])))
開發者ID:WaywardGame,項目名稱:developertools,代碼行數:1,代碼來源:GeneralPanel.ts


注:本文中的utilities/iterable/Generators.tuple函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。