当前位置: 首页>>代码示例>>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;未经允许,请勿转载。