本文整理匯總了TypeScript中Immutable.Map.keySeq方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Map.keySeq方法的具體用法?TypeScript Map.keySeq怎麽用?TypeScript Map.keySeq使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Immutable.Map
的用法示例。
在下文中一共展示了Map.keySeq方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: resetAll
resetAll(forceUpdate = true) {
this.states.keySeq().forEach(
key => this.reset.bind(this)(key, false)
)
this.notifyUpdate(forceUpdate)
return this
}
示例2: constructor
constructor(data: string) { // data is the contents of the file
let parserResults: ParserResults = (new Parser(data)).getParserResults();
this.desiredPrice = parserResults.desiredPrice;
this.priceMap = parserResults.foodEntries;
let knapsack = new Knapsack(
this.priceMap.keySeq().toOrderedSet(), // Seq of unique prices
this.desiredPrice
);
this.priceCombinations = knapsack.getResults();
let formatter = new Formatter(this.priceMap, this.priceCombinations);
this.results = formatter.getSentences();
}
示例3: getCloneName
private getCloneName(bootEnvironment: BootEnvironment): string {
let commonPrefix = bootEnvironment.id + '-copy-',
usedNames = _.filter((this.bootEnvironments.keySeq().toJS() as string[]), name => _.startsWith(commonPrefix)),
lastUsedIndex = !usedNames.length ?
0 :
_.last(
_.sortBy(
_.map(
usedNames,
name => _.toNumber(name.substring(commonPrefix.length))
)
)
);
return commonPrefix + _.toString(lastUsedIndex + 1);
}