本文整理匯總了TypeScript中eez-studio-shared/model/store.OutputSectionsStore.getSection方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript OutputSectionsStore.getSection方法的具體用法?TypeScript OutputSectionsStore.getSection怎麽用?TypeScript OutputSectionsStore.getSection使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類eez-studio-shared/model/store.OutputSectionsStore
的用法示例。
在下文中一共展示了OutputSectionsStore.getSection方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: showCheckResult
function showCheckResult() {
let outputSection = OutputSectionsStore.getSection(Section.OUTPUT);
let checkResultMassage: string;
if (outputSection.numErrors == 0) {
checkResultMassage = "No error";
} else if (outputSection.numErrors == 1) {
checkResultMassage = "1 error";
} else {
checkResultMassage = `${outputSection.numErrors} errors`;
}
checkResultMassage += " and ";
if (outputSection.numWarnings == 0) {
checkResultMassage += " no warning";
} else if (outputSection.numWarnings == 1) {
checkResultMassage += " 1 warning";
} else {
checkResultMassage += ` ${outputSection.numWarnings} warnings`;
}
checkResultMassage += " detected";
OutputSectionsStore.write(Section.OUTPUT, Type.INFO, checkResultMassage);
}