本文整理匯總了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']);
});