当前位置: 首页>>代码示例>>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;未经允许,请勿转载。