本文整理汇总了TypeScript中farmbot-toastr.warning函数的典型用法代码示例。如果您正苦于以下问题:TypeScript warning函数的具体用法?TypeScript warning怎么用?TypeScript warning使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了warning函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: onMalformed
export function onMalformed() {
bothUp("Got a malformed message");
if (!HACKY_FLAGS.alreadyToldUserAboutMalformedMsg) {
warning(t(Content.MALFORMED_MESSAGE_REC_UPGRADE));
HACKY_FLAGS.alreadyToldUserAboutMalformedMsg = true;
}
}
示例2: function
bot.on("malformed", function () {
if (!alreadyToldYou) {
warning(t(`FarmBot sent a malformed message. You may need to upgrade
FarmBot OS. Please upgrade FarmBot OS and log back in.`));
alreadyToldYou = true;
}
});
示例3: setTimeOffset
export function setTimeOffset(ms: number) {
if (isNaN(ms) || !isNumber(ms)) {
warning(t("Time is not properly formatted."), t("Bad Input"));
throw new Error("Bad time input on regimen page: " + JSON.stringify(ms));
} else {
return { type: Actions.SET_TIME_OFFSET, payload: ms };
}
}
示例4: showLogOnScreen
export function showLogOnScreen(log: Log) {
switch (log.type) {
case "success":
return success(log.message, t(TITLE));
case "warn":
return warning(log.message, t(TITLE));
case "busy":
case "error":
return error(log.message, t(TITLE));
case "fun":
case "info":
default:
return info(log.message, t(TITLE));
}
}
示例5: showLogOnScreen
export function showLogOnScreen(log: Log) {
switch (log.type) {
case MessageType.success:
return success(log.message, t(TITLE));
case MessageType.warn:
return warning(log.message, t(TITLE));
case MessageType.busy:
case MessageType.error:
return error(log.message, t(TITLE));
case MessageType.fun:
case MessageType.info:
default:
return info(log.message, t(TITLE));
}
}
示例6: warning
() => warning(t("Attempting to reconnect to the message broker"), t("Offline"));
示例7: warning
let fail = () => warning("Please try refreshing the page.",
"Error downloading data");
示例8: warning
const dont = (err: string) => warning(err);