本文整理汇总了TypeScript中ololog.default函数的典型用法代码示例。如果您正苦于以下问题:TypeScript default函数的具体用法?TypeScript default怎么用?TypeScript default使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了default函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: getTransactions
async getTransactions(account) {
const collection = [];
let results = await this.client.apis.Transactions.getAndSearchAllTransactions({
accountIds: [account.id],
view: 'bankView',
});
collection.push(...results.body.transactions);
log(results.body.paging);
while (results.body.paging.page < results.body.paging.pageCount) {
log('page', results.body.paging.page, 'of', results.body.paging.pageCount, collection.length);
results = await this.client.apis.Transactions.getAndSearchAllTransactions({
accountIds: [account.id],
view: 'bankView',
page: results.body.paging.page + 1,
});
collection.push(...results.body.transactions);
}
// log(results);
return collection;
}
示例2: makeConnection
async makeConnection(bank, account, password) {
const results = await this.client.apis['Bank Connections'].importBankConnection({
body: JSON.stringify({
bankId: bank.id,
bankingUserId: account,
bankingPin: password,
})
});
log('makeConnection', results.body);
return results.body;
}
示例3: Transaction
it('getDate*1000*1000', () => {
const t = new Transaction({
id: 1236543,
date: '2018-06-01',
category: 'some cat',
amount: 123.55,
note: 'REWE',
done: false,
});
const start = new Date();
for (let i = 0; i < 1000*1000; i++) {
t.getDate();
}
const duration = (new Date().getTime() - start.getTime()) / 1000;
log(duration);
expect(duration).toBeLessThanOrEqual(0.006);
});
示例4: fetch
async fetch(UserUsername, UserPassword, UserBLZ, UserKonto, UserPIN) {
await this.initFinApi();
// await this.login();
log('Auth...', UserUsername, UserPassword);
await this.loginUser(UserUsername, UserPassword);
log('Connection...');
let connection = await this.getConnection(UserBLZ);
if (!connection) {
log('Bank...', UserBLZ);
const bank = await this.findBank(UserBLZ);
log('MakeConnection...');
connection = await this.makeConnection(bank, UserKonto, UserPIN);
}
log('Accounts...');
let account = await this.getAccounts(connection, UserKonto);
log(account);
let transactions = await this.getTransactions(account);
log(transactions.length);
return transactions;
}
示例5:
it('getVisible', () => {
ex.setAllVisible();
log(ex.toJSON());
expect(ex.getVisible().length).toBe(3);
expect(ex.getVisibleCount()).toBe(3);
})
示例6:
it('getOptions', () => {
cc.setExpenses(ex);
log(cc.getOptions());
expect(cc.getOptions()).toEqual(['cat name', 'some cat', 'some cat 2']);
});