本文整理汇总了TypeScript中bignumber.js.BigNumber.config方法的典型用法代码示例。如果您正苦于以下问题:TypeScript js.BigNumber.config方法的具体用法?TypeScript js.BigNumber.config怎么用?TypeScript js.BigNumber.config使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bignumber.js.BigNumber
的用法示例。
在下文中一共展示了js.BigNumber.config方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
import { BigNumber } from 'bignumber.js';
// By default BigNumber's `toString` method converts to exponential notation if the value has
// more then 20 digits. We want to avoid this behavior, so we set EXPONENTIAL_AT to a high number
BigNumber.config({
EXPONENTIAL_AT: 1000,
});
export { BigNumber };
示例2:
CellEntry,
CurrencySelector,
BudgetCategorySelector,
FormattedAmount,
ProjectItemComponent,
ProjectViewer,
Spreadsheet,
TagList,
TagName,
],
bootstrap: [
AppComponent
],
imports: [
BrowserModule,
FormsModule,
],
})
export class App {}
BigNumber.config({
DECIMAL_PLACES: 30,
ROUNDING_MODE: BigNumber.ROUND_HALF_EVEN,
FORMAT: {
groupSeparator: '',
decimalSeparator: '.'
}
});
platformBrowserDynamic().bootstrapModule(App);
示例3:
import { BigNumber } from "bignumber.js";
import { Augur, FormattedEventLog } from "augur.js";
import { EventEmitter } from "events";
import { NetworkConfiguration } from "augur-core";
import * as Knex from "knex";
import * as WebSocket from "ws";
import * as https from "https";
import * as http from "http";
import * as t from "io-ts";
// BigNumber Configs
//
BigNumber.config({
MODULO_MODE: BigNumber.EUCLID,
ROUNDING_MODE: BigNumber.ROUND_HALF_DOWN,
EXPONENTIAL_AT: [-1E9, 1E9],
});
export { BlockDetail, FormattedEventLog } from "augur.js";
export enum ReportingState {
PRE_REPORTING = "PRE_REPORTING",
DESIGNATED_REPORTING = "DESIGNATED_REPORTING",
OPEN_REPORTING = "OPEN_REPORTING",
CROWDSOURCING_DISPUTE = "CROWDSOURCING_DISPUTE",
AWAITING_NEXT_WINDOW = "AWAITING_NEXT_WINDOW",
AWAITING_FINALIZATION = "AWAITING_FINALIZATION",
FINALIZED = "FINALIZED",
FORKING = "FORKING",
AWAITING_NO_REPORT_MIGRATION = "AWAITING_NO_REPORT_MIGRATION",
AWAITING_FORK_MIGRATION = "AWAITING_FORK_MIGRATION",