當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript ololog.default函數代碼示例

本文整理匯總了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;
	}
開發者ID:spidgorny,項目名稱:umsaetze,代碼行數:20,代碼來源:FetchExpenses.ts

示例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;
	}
開發者ID:spidgorny,項目名稱:umsaetze,代碼行數:11,代碼來源:FetchExpenses.ts

示例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);
	});
開發者ID:spidgorny,項目名稱:umsaetze,代碼行數:17,代碼來源:Transaction.spec.ts

示例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;
	}
開發者ID:spidgorny,項目名稱:umsaetze,代碼行數:23,代碼來源:FetchExpenses.ts

示例5:

	it('getVisible', () => {
		ex.setAllVisible();
		log(ex.toJSON());
		expect(ex.getVisible().length).toBe(3);
		expect(ex.getVisibleCount()).toBe(3);
	})
開發者ID:spidgorny,項目名稱:umsaetze,代碼行數:6,代碼來源:Expenses.spec.ts

示例6:

	it('getOptions', () => {
		cc.setExpenses(ex);
		log(cc.getOptions());
		expect(cc.getOptions()).toEqual(['cat name', 'some cat', 'some cat 2']);
	});
開發者ID:spidgorny,項目名稱:umsaetze,代碼行數:5,代碼來源:CategoryCollection.spec.ts


注:本文中的ololog.default函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。