Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cycle/run

Package Overview
Dependencies
Maintainers
3
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cycle/run - npm Package Compare versions

Comparing version 5.1.0-rc.0 to 5.1.0-rc.1

4

lib/cjs/types.d.ts

@@ -32,3 +32,5 @@ import { Stream } from 'xstream';

export declare type MatchingMain<D extends Drivers, M extends Main> = Main & {
(so?: Partial<Sources<D>>): Sinks<M>;
(so: Sources<D>): Sinks<M>;
} | Main & {
(): Sinks<M>;
};

@@ -35,0 +37,0 @@ export declare type MatchingDrivers<D extends Drivers, M extends Main> = Drivers & {

@@ -32,3 +32,5 @@ import { Stream } from 'xstream';

export declare type MatchingMain<D extends Drivers, M extends Main> = Main & {
(so?: Partial<Sources<D>>): Sinks<M>;
(so: Sources<D>): Sinks<M>;
} | Main & {
(): Sinks<M>;
};

@@ -35,0 +37,0 @@ export declare type MatchingDrivers<D extends Drivers, M extends Main> = Drivers & {

{
"name": "@cycle/run",
"version": "5.1.0-rc.0",
"version": "5.1.0-rc.1",
"description": "The Cycle.js run() function to use with xstream",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -40,3 +40,5 @@ import {Stream} from 'xstream';

export type MatchingMain<D extends Drivers, M extends Main> = Main & {
(so?: Partial<Sources<D>>): Sinks<M>;
(so: Sources<D>): Sinks<M>;
} | Main & {
(): Sinks<M>;
};

@@ -43,0 +45,0 @@

@@ -32,2 +32,24 @@ // tslint:disable-next-line

it('should allow to not use all sources in main', function() {
function app(so: {first: Stream<string>}) {
return {
first: xs.of('test'),
second: xs.of('string')
};
}
function app2() {
return { second: xs.of('test') };
}
function driver(sink: Stream<string>) {
return xs.of('answer');
}
const {sinks, sources} = setup(app, {first: driver, second: driver});
const {sinks: sinks2, sources: sources2} = setup(app2, {first: driver, second: driver});
assert.strictEqual(typeof sinks, 'object');
assert.strictEqual(typeof sinks.second.addListener, 'function');
assert.strictEqual(typeof sinks2, 'object');
assert.strictEqual(typeof sinks2.second.addListener, 'function');
});
it('should return sinks object and sources object', function() {

@@ -34,0 +56,0 @@ function app(ext: {other: Stream<string>}) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc