本文整理汇总了TypeScript中external/gs_tools/src/data/cache.cache函数的典型用法代码示例。如果您正苦于以下问题:TypeScript cache函数的具体用法?TypeScript cache怎么用?TypeScript cache使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了cache函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: getBaseLightest
@cache()
getBaseLightest(reverseMode: boolean): Color {
return Theme.createShade_(this.base_, 0.5 + this.baseDistance_ * 2, reverseMode);
}
示例2: getBlackFade
@cache()
getBlackFade(): Color {
return Theme.getForegroundFade_(BLACK, this.getBaseLight(true), this.contrast_ * 2 / 3);
}
示例3: getBase
@cache()
getBase(): Color {
return Theme.createShade_(this.base_, 0.5, true);
}
示例4: getBaseDark
@cache()
getBaseDark(reverseMode: boolean): Color {
return Theme.createShade_(this.base_, 0.5 - this.baseDistance_, reverseMode);
}
示例5: getActionDark
@cache()
getActionDark(reverseMode: boolean): Color {
return Theme.createShade_(this.accent_, 0.5 - this.actionDistance_, reverseMode);
}
示例6: getActionLightest
@cache()
getActionLightest(reverseMode: boolean): Color {
return Theme.createShade_(this.accent_, 0.5 + this.actionDistance_ * 2, reverseMode);
}
示例7: getAction
@cache()
getAction(): Color {
return Theme.createShade_(this.accent_, 0.5, true);
}
示例8: getWhiteFader
@cache()
getWhiteFader(): Color {
return Theme.getForegroundFade_(WHITE, BLACK, this.contrast_ / 3);
}
示例9: getWhiteFade
@cache()
getWhiteFade(): Color {
return Theme.getForegroundFade_(WHITE, this.getBaseDark(false), this.contrast_ * 2 / 3);
}
示例10: getBlackOnAccent
@cache()
getBlackOnAccent(): Color {
const accent = this.getAccent();
return Colors.getContrast(BLACK, accent) > Colors.getContrast(WHITE, accent) ? BLACK : WHITE;
}