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


TypeScript event-stream.readArray函數代碼示例

本文整理匯總了TypeScript中event-stream.readArray函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript readArray函數的具體用法?TypeScript readArray怎麽用?TypeScript readArray使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了readArray函數的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: it

	it('should return a function', done => {
		const src = [1, 2, 3];
		const inp = es.readArray(src);
		const factory = util.combine(inp);
		factory.should.be.type('function');
		done();
	});
開發者ID:AbraaoAlves,項目名稱:DefinitelyTyped,代碼行數:7,代碼來源:gulp-util-tests.ts

示例2: Vinyl

gulp.task('create:common-less', () => {
	const theme = {
		'@theme-color': config.publicConfig.themeColor,
		'@resources-url': `"${config.publicConfig.resourcesUrl}"`
	};
	const vinyl = new Vinyl({
		path: 'common.less',
		contents: new Buffer('\n')
	});
	return es.readArray([vinyl]).pipe(lessVars(theme)).pipe(gulp.dest('./src/sites/common/'));
});
開發者ID:sagume,項目名稱:Misskey-Web,代碼行數:11,代碼來源:gulpfile.ts

示例3: File

		.then(fileNames => {
			const files = fileNames
				.map(fileName => path.join(extensionPath, fileName))
				.map(filePath => new File({
					path: filePath,
					stat: fs.statSync(filePath),
					base: extensionPath,
					contents: fs.createReadStream(filePath) as any
				}));

			es.readArray(files).pipe(result);
		})
開發者ID:jinlongchen2018,項目名稱:vscode,代碼行數:12,代碼來源:extensions.ts

示例4: it

        it("should modify the file contents", (done) => {
            var fakeFile = new TestFile({
                contents: es.readArray(["<", "My", "Component", "/>"])
            });

            var trans = transform();
            trans.write(fakeFile);
            trans.once("data", (file: any) => {
                expect(file.isStream()).to.be.true;

                file.contents.pipe(es.wait((err: any, data: any) => {
                    expect(data.toString()).to.equal("ViewHost.render(MyComponent, null);");
                    done();
                }));
            });
        });
開發者ID:KallynGowdy,項目名稱:RxUI-View,代碼行數:16,代碼來源:gulp.test.ts

示例5:

gulp.task("es:readArray ", () => {
    var reader = es.readArray([1, 2, 3]);
});
開發者ID:AbraaoAlves,項目名稱:DefinitelyTyped,代碼行數:3,代碼來源:event-stream-tests.ts


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