Comparing version 1.0.0-beta.2-tsconfig to 1.0.0-beta.2-tsconfig.2
export * from "./master/index"; | ||
export { expose } from "./worker/index"; | ||
export { Observable } from "./observable"; | ||
export { Transfer, TransferDescriptor } from "./transferable"; |
@@ -9,3 +9,5 @@ "use strict"; | ||
exports.expose = index_1.expose; | ||
var observable_1 = require("./observable"); | ||
exports.Observable = observable_1.Observable; | ||
var transferable_1 = require("./transferable"); | ||
exports.Transfer = transferable_1.Transfer; |
"use strict"; | ||
// tslint:disable no-eval max-classes-per-file | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const callsites_1 = require("callsites"); | ||
const events_1 = require("events"); | ||
const callsites_1 = __importDefault(require("callsites")); | ||
const events_1 = __importDefault(require("events")); | ||
const os_1 = require("os"); | ||
const path = require("path"); | ||
const path = __importStar(require("path")); | ||
const defaultPoolSize = os_1.cpus().length; | ||
@@ -9,0 +19,0 @@ function rebaseScriptPath(scriptPath, ignoreRegex) { |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const implementation_1 = require("./implementation"); | ||
const implementation_1 = __importDefault(require("./implementation")); | ||
var pool_1 = require("./pool"); | ||
@@ -5,0 +8,0 @@ exports.Pool = pool_1.Pool; |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const debug_1 = require("debug"); | ||
const debug_1 = __importDefault(require("debug")); | ||
const common_1 = require("../common"); | ||
@@ -5,0 +8,0 @@ const observable_promise_1 = require("../observable-promise"); |
@@ -1,2 +0,2 @@ | ||
import Observable = require("zen-observable"); | ||
import { Observable } from "../observable"; | ||
import { Thread } from "./thread"; | ||
@@ -3,0 +3,0 @@ export { Thread }; |
@@ -10,7 +10,10 @@ "use strict"; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const debug_1 = require("debug"); | ||
const Observable = require("zen-observable"); | ||
const debug_1 = __importDefault(require("debug")); | ||
const observable_1 = require("../observable"); | ||
const observable_promise_1 = require("../observable-promise"); | ||
const implementation_1 = require("./implementation"); | ||
const implementation_1 = __importDefault(require("./implementation")); | ||
const thread_1 = require("./thread"); | ||
@@ -98,3 +101,3 @@ exports.Thread = thread_1.Thread; | ||
let eventSubject; | ||
const eventObservable = observable_promise_1.makeHot(new Observable(subscriber => { | ||
const eventObservable = observable_promise_1.makeHot(new observable_1.Observable(subscriber => { | ||
eventSubject = subscriber; | ||
@@ -101,0 +104,0 @@ })); |
@@ -1,2 +0,2 @@ | ||
import Observable = require("zen-observable"); | ||
import { Observable } from "../observable"; | ||
import { FunctionThread, ModuleThread, Worker as WorkerType } from "../types/master"; | ||
@@ -3,0 +3,0 @@ import { WorkerFunction, WorkerModule } from "../types/worker"; |
@@ -10,6 +10,9 @@ "use strict"; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const debug_1 = require("debug"); | ||
const Observable = require("zen-observable"); | ||
const debug_1 = __importDefault(require("debug")); | ||
const common_1 = require("../common"); | ||
const observable_1 = require("../observable"); | ||
const promise_1 = require("../promise"); | ||
@@ -56,3 +59,3 @@ const symbols_1 = require("../symbols"); | ||
function createEventObservable(worker, workerTermination) { | ||
return new Observable(observer => { | ||
return new observable_1.Observable(observer => { | ||
const messageHandler = ((messageEvent) => { | ||
@@ -59,0 +62,0 @@ const workerEvent = { |
@@ -1,8 +0,7 @@ | ||
import Observable = require("zen-observable"); | ||
import { Thread as ThreadType, WorkerEvent } from "../types/master"; | ||
export declare type Thread = ThreadType; | ||
export declare const Thread: { | ||
errors<ThreadT extends ThreadType>(thread: ThreadT): Observable<Error>; | ||
events<ThreadT extends ThreadType>(thread: ThreadT): Observable<WorkerEvent>; | ||
errors<ThreadT extends ThreadType>(thread: ThreadT): import("../observable").ObservableT<Error>; | ||
events<ThreadT extends ThreadType>(thread: ThreadT): import("../observable").ObservableT<WorkerEvent>; | ||
terminate<ThreadT extends ThreadType>(thread: ThreadT): Promise<void>; | ||
}; |
@@ -1,4 +0,4 @@ | ||
import Observable = require("zen-observable"); | ||
import { Observable, SubscriptionObserver } from "./observable"; | ||
export declare type ObservablePromise<T> = Promise<T> & Observable<T>; | ||
declare type Initializer<T> = (resolve: (value?: T) => void, reject: (error: Error) => void, observer: ZenObservable.SubscriptionObserver<T>) => UnsubscribeFn | void; | ||
declare type Initializer<T> = (resolve: (value?: T) => void, reject: (error: Error) => void, observer: SubscriptionObserver<T>) => UnsubscribeFn | void; | ||
declare type UnsubscribeFn = () => void; | ||
@@ -5,0 +5,0 @@ /** |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const Observable = require("zen-observable"); | ||
const observable_1 = require("./observable"); | ||
const doNothing = () => undefined; | ||
@@ -54,3 +54,3 @@ const returnInput = (input) => input; | ||
}; | ||
const observable = new Observable(originalObserver => { | ||
const observable = new observable_1.Observable(originalObserver => { | ||
const observer = Object.assign({}, originalObserver, { complete() { | ||
@@ -57,0 +57,0 @@ originalObserver.complete(); |
@@ -1,3 +0,42 @@ | ||
import Observable from "zen-observable"; | ||
/// <reference path="../types/zen-observable.d.ts" /> | ||
import BaseObservable from "zen-observable"; | ||
declare const $observers: unique symbol; | ||
export interface SubscriptionObserver<T> { | ||
closed: boolean; | ||
next(value: T): void; | ||
error(errorValue: any): void; | ||
complete(): void; | ||
} | ||
export interface Subscription { | ||
closed: boolean; | ||
unsubscribe(): void; | ||
} | ||
export interface Observer<T> { | ||
start?(subscription: Subscription): any; | ||
next?(value: T): void; | ||
error?(errorValue: any): void; | ||
complete?(): void; | ||
} | ||
export declare type Subscriber<T> = (observer: SubscriptionObserver<T>) => void | (() => void) | Subscription; | ||
export interface ObservableLike<T> { | ||
subscribe?: Subscriber<T>; | ||
[Symbol.observable](): ObservableT<T> | ObservableLike<T>; | ||
} | ||
export declare class ObservableT<T> { | ||
constructor(subscriber: Subscriber<T>); | ||
subscribe(observer: Observer<T>): Subscription; | ||
subscribe(onNext: (value: T) => void, onError?: (error: any) => void, onComplete?: () => void): Subscription; | ||
[Symbol.observable](): ObservableT<T>; | ||
forEach(callback: (value: T) => void): Promise<void>; | ||
map<R>(callback: (value: T) => R): ObservableT<R>; | ||
filter(callback: (value: T) => boolean): ObservableT<T>; | ||
reduce(callback: (previousValue: T, currentValue: T) => T, initialValue?: T): ObservableT<T>; | ||
reduce<R>(callback: (previousValue: R, currentValue: T) => R, initialValue?: R): ObservableT<R>; | ||
flatMap<R>(callback: (value: T) => ObservableLike<R>): ObservableT<R>; | ||
concat<R>(...observable: Array<ObservableT<R>>): ObservableT<R>; | ||
static from<R>(observable: ObservableT<R> | ObservableLike<R> | ArrayLike<R>): ObservableT<R>; | ||
static of<R>(...items: R[]): ObservableT<R>; | ||
} | ||
export declare const Observable: typeof BaseObservable; | ||
export declare type Observable<T> = ObservableT<T>; | ||
/** | ||
@@ -12,3 +51,3 @@ * Observable subject. Implements the Observable interface, but also exposes | ||
*/ | ||
declare class Subject<T> extends Observable<T> implements ZenObservable.ObservableLike<T> { | ||
export declare class Subject<T> extends BaseObservable<T> implements ObservableLike<T> { | ||
private [$observers]; | ||
@@ -20,2 +59,2 @@ constructor(); | ||
} | ||
export { Observable, Subject }; | ||
export {}; |
"use strict"; | ||
// tslint:disable max-classes-per-file no-reference | ||
/// <reference path="../types/zen-observable.d.ts" /> | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const zen_observable_1 = require("zen-observable"); | ||
// Somewhat unelegant code to prevent the consuming app's tsconfig needing to set | ||
// `compilerOptions.esModuleInterop` | ||
const zen_observable_1 = __importDefault(require("zen-observable")); | ||
const $observers = Symbol("observers"); | ||
exports.Observable = zen_observable_1.default; | ||
const $observers = Symbol("observers"); | ||
/** | ||
@@ -7,0 +14,0 @@ * Observable subject. Implements the Observable interface, but also exposes |
@@ -40,5 +40,3 @@ /// <reference no-default-lib="true"/> | ||
} | ||
interface EventListener { | ||
(evt: Event): void; | ||
} | ||
declare type EventListener = (evt: Event) => void; | ||
interface EventListenerOptions { | ||
@@ -45,0 +43,0 @@ capture?: boolean; |
@@ -1,2 +0,2 @@ | ||
import Observable = require("zen-observable"); | ||
import { Observable } from "../observable"; | ||
import { ObservablePromise } from "../observable-promise"; | ||
@@ -3,0 +3,0 @@ import { $errors, $events, $terminate, $worker } from "../symbols"; |
"use strict"; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const WorkerThreads = require("../worker_threads"); | ||
const WorkerThreads = __importStar(require("../worker_threads")); | ||
function assertMessagePort(port) { | ||
@@ -5,0 +12,0 @@ if (!port) { |
@@ -0,3 +1,5 @@ | ||
import { Observable } from "../observable"; | ||
import { WorkerFunction, WorkerModule } from "../types/worker"; | ||
export { Transfer } from "../transferable"; | ||
export { Observable }; | ||
export declare function expose(exposed: WorkerFunction | WorkerModule<any>): void; |
@@ -10,8 +10,13 @@ "use strict"; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const is_observable_1 = require("is-observable"); | ||
const is_observable_1 = __importDefault(require("is-observable")); | ||
const common_1 = require("../common"); | ||
const observable_1 = require("../observable"); | ||
exports.Observable = observable_1.Observable; | ||
const transferable_1 = require("../transferable"); | ||
const messages_1 = require("../types/messages"); | ||
const implementation_1 = require("./implementation"); | ||
const implementation_1 = __importDefault(require("./implementation")); | ||
var transferable_2 = require("../transferable"); | ||
@@ -18,0 +23,0 @@ exports.Transfer = transferable_2.Transfer; |
{ | ||
"name": "threads", | ||
"version": "1.0.0-beta.2-tsconfig", | ||
"version": "1.0.0-beta.2-tsconfig.2", | ||
"description": "Easy to use, yet powerful multi-threading library for node.js, web browsers and Electron", | ||
@@ -38,3 +38,2 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@types/zen-observable": "^0.8.0", | ||
"callsites": "^3.1.0", | ||
@@ -52,2 +51,3 @@ "debug": "^4.1.1", | ||
"@types/debug": "^4.1.4", | ||
"@types/execa": "^0.9.0", | ||
"@types/mocha": "^5.2.6", | ||
@@ -59,2 +59,3 @@ "@types/node": "^11.13.8", | ||
"cross-env": "^5.2.0", | ||
"execa": "^2.0.3", | ||
"mocha": "^5.2.0", | ||
@@ -105,2 +106,3 @@ "npm-run-all": "^4.1.5", | ||
"dist/**", | ||
"types/**", | ||
"*.js", | ||
@@ -107,0 +109,0 @@ "*.ts" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
91668
5
66
1963
28
- Removed@types/zen-observable@^0.8.0
- Removed@types/zen-observable@0.8.7(transitive)