if (value === undefined) {
return key;
}
- // fetch Template, as it cannot be provided because of a circular dependency
if (Template_1.default === undefined) {
- //@ts-ignore
+ // @ts-expect-error: This is required due to a circular dependency.
Template_1.default = require("./Template");
}
if (typeof value === "string") {
function addThousandsSeparator(number) {
// Fetch Language, as it cannot be provided because of a circular dependency
if (Language === undefined) {
- //@ts-ignore
+ // @ts-expect-error: This is required due to a circular dependency.
Language = require("./Language");
}
return String(number).replace(/(^-?\d{1,3}|\d{3})(?=(?:\d{3})+(?:$|\.))/g, "$1" + Language.get("wcf.global.thousandsSeparator"));
function formatNumeric(number, decimalPlaces) {
// Fetch Language, as it cannot be provided because of a circular dependency
if (Language === undefined) {
- //@ts-ignore
+ // @ts-expect-error: This is required due to a circular dependency.
Language = require("./Language");
}
let tmp = NumberUtil.round(number, decimalPlaces || -2).toString();
parser = new Parser();*/
class Template {
constructor(template) {
- // Fetch Language/StringUtil, as it cannot be provided because of a circular dependency
if (Language === undefined) {
- //@ts-ignore
+ // @ts-expect-error: This is required due to a circular dependency.
Language = require("./Language");
}
if (StringUtil === undefined) {
- //@ts-ignore
+ // @ts-expect-error: This is required due to a circular dependency.
StringUtil = require("./StringUtil");
}
try {
return key;
}
- // fetch Template, as it cannot be provided because of a circular dependency
if (Template === undefined) {
- //@ts-ignore
+ // @ts-expect-error: This is required due to a circular dependency.
Template = require("./Template");
}
export function addThousandsSeparator(number: number): string {
// Fetch Language, as it cannot be provided because of a circular dependency
if (Language === undefined) {
- //@ts-ignore
+ // @ts-expect-error: This is required due to a circular dependency.
Language = require("./Language");
}
export function formatNumeric(number: number, decimalPlaces?: number): string {
// Fetch Language, as it cannot be provided because of a circular dependency
if (Language === undefined) {
- //@ts-ignore
+ // @ts-expect-error: This is required due to a circular dependency.
Language = require("./Language");
}
class Template {
constructor(template: string) {
- // Fetch Language/StringUtil, as it cannot be provided because of a circular dependency
if (Language === undefined) {
- //@ts-ignore
+ // @ts-expect-error: This is required due to a circular dependency.
Language = require("./Language");
}
if (StringUtil === undefined) {
- //@ts-ignore
+ // @ts-expect-error: This is required due to a circular dependency.
StringUtil = require("./StringUtil");
}