当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript js.BigNumber.config方法代码示例

本文整理汇总了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 };
开发者ID:ewingrj,项目名称:0x-monorepo,代码行数:9,代码来源:configured_bignumber.ts

示例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);

开发者ID:gaborfeher,项目名称:grantmaster,代码行数:29,代码来源:App.ts

示例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",
开发者ID:AugurProject,项目名称:augur_node,代码行数:31,代码来源:types.ts


注:本文中的bignumber.js.BigNumber.config方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。