wonder-frp
Advanced tools
Comparing version 0.1.13 to 0.1.14
@@ -22,3 +22,3 @@ var __extends = (this && this.__extends) || (function () { | ||
import { ClassMapUtils } from "../utils/ClassMapUtils"; | ||
import { require, assert } from "../definition/typescript/decorator/contract"; | ||
import { requireCheck, assert } from "../definition/typescript/decorator/contract"; | ||
import { FunctionUtils } from "wonder-commonlib/dist/es2015/utils/FunctionUtils"; | ||
@@ -231,3 +231,3 @@ import { JudgeUtils } from "../JudgeUtils"; | ||
__decorate([ | ||
require(function (count) { | ||
requireCheck(function (count) { | ||
if (count === void 0) { count = 1; } | ||
@@ -238,3 +238,3 @@ assert(count >= 0, Log.info.FUNC_SHOULD("count", ">= 0")); | ||
__decorate([ | ||
require(function (count) { | ||
requireCheck(function (count) { | ||
if (count === void 0) { count = 1; } | ||
@@ -241,0 +241,0 @@ assert(count >= 0, Log.info.FUNC_SHOULD("count", ">= 0")); |
@@ -10,3 +10,3 @@ import { Log } from "wonder-commonlib/dist/es2015/Log"; | ||
import { ClassMapUtils } from "../utils/ClassMapUtils"; | ||
import { require, assert } from "../definition/typescript/decorator/contract"; | ||
import { requireCheck, assert } from "../definition/typescript/decorator/contract"; | ||
import { FunctionUtils } from "wonder-commonlib/dist/es2015/utils/FunctionUtils"; | ||
@@ -63,3 +63,3 @@ import { JudgeUtils } from "../JudgeUtils"; | ||
@require(function(count: number = 1) { | ||
@requireCheck(function(count: number = 1) { | ||
assert(count >= 0, Log.info.FUNC_SHOULD("count", ">= 0")); | ||
@@ -93,3 +93,3 @@ }) | ||
@require(function(count: number = 1) { | ||
@requireCheck(function(count: number = 1) { | ||
assert(count >= 0, Log.info.FUNC_SHOULD("count", ">= 0")); | ||
@@ -96,0 +96,0 @@ }) |
export declare function assert(cond: boolean, message?: string): void; | ||
export declare function require(InFunc: any): (target: any, name: any, descriptor: any) => any; | ||
export declare function requireCheck(InFunc: any): (target: any, name: any, descriptor: any) => any; | ||
export declare function ensure(OutFunc: any): (target: any, name: any, descriptor: any) => any; | ||
@@ -4,0 +4,0 @@ export declare function requireGetter(InFunc: any): (target: any, name: any, descriptor: any) => any; |
@@ -7,3 +7,3 @@ import { Log } from "wonder-commonlib/dist/es2015/Log"; | ||
} | ||
export function require(InFunc) { | ||
export function requireCheck(InFunc) { | ||
return function (target, name, descriptor) { | ||
@@ -10,0 +10,0 @@ var value = descriptor.value; |
@@ -8,3 +8,3 @@ import { Log } from "wonder-commonlib/dist/es2015/Log"; | ||
export function require(InFunc) { | ||
export function requireCheck(InFunc) { | ||
return function(target, name, descriptor) { | ||
@@ -11,0 +11,0 @@ var value = descriptor.value; |
@@ -8,3 +8,3 @@ export { JudgeUtils } from "./JudgeUtils"; | ||
export { Stream } from "./core/Stream"; | ||
export { assert, require, ensure, requireGetter, requireSetter, ensureGetter, ensureSetter, invariant } from "./definition/typescript/decorator/contract"; | ||
export { assert, requireCheck, ensure, requireGetter, requireSetter, ensureGetter, ensureSetter, invariant } from "./definition/typescript/decorator/contract"; | ||
export { GroupDisposable } from "./Disposable/GroupDisposable"; | ||
@@ -11,0 +11,0 @@ export { IDisposable } from "./Disposable/IDisposable"; |
@@ -8,3 +8,3 @@ export { JudgeUtils } from "./JudgeUtils"; | ||
export { Stream } from "./core/Stream"; | ||
export { assert, require, ensure, requireGetter, requireSetter, ensureGetter, ensureSetter, invariant } from "./definition/typescript/decorator/contract"; | ||
export { assert, requireCheck, ensure, requireGetter, requireSetter, ensureGetter, ensureSetter, invariant } from "./definition/typescript/decorator/contract"; | ||
export { GroupDisposable } from "./Disposable/GroupDisposable"; | ||
@@ -11,0 +11,0 @@ export { InnerSubscription } from "./Disposable/InnerSubscription"; |
@@ -8,3 +8,3 @@ export { JudgeUtils } from "./JudgeUtils"; | ||
export { Stream } from "./core/Stream"; | ||
export { assert, require, ensure, requireGetter, requireSetter, ensureGetter, ensureSetter, invariant } from "./definition/typescript/decorator/contract"; | ||
export { assert, requireCheck, ensure, requireGetter, requireSetter, ensureGetter, ensureSetter, invariant } from "./definition/typescript/decorator/contract"; | ||
export { GroupDisposable } from "./Disposable/GroupDisposable"; | ||
@@ -11,0 +11,0 @@ export { IDisposable } from "./Disposable/IDisposable"; |
@@ -18,3 +18,3 @@ var __extends = (this && this.__extends) || (function () { | ||
import { Observer } from "../core/Observer"; | ||
import { require } from "../definition/typescript/decorator/contract"; | ||
import { requireCheck } from "../definition/typescript/decorator/contract"; | ||
import { Log } from "wonder-commonlib/dist/es2015/Log"; | ||
@@ -76,3 +76,3 @@ var AutoDetachObserver = (function (_super) { | ||
__decorate([ | ||
require(function () { | ||
requireCheck(function () { | ||
if (this.isDisposed) { | ||
@@ -79,0 +79,0 @@ Log.warn("only can dispose once"); |
import { Observer } from "../core/Observer"; | ||
import { IObserver } from "./IObserver"; | ||
import { require } from "../definition/typescript/decorator/contract"; | ||
import { requireCheck } from "../definition/typescript/decorator/contract"; | ||
import { Log } from "wonder-commonlib/dist/es2015/Log"; | ||
@@ -19,3 +19,3 @@ | ||
@require(function() { | ||
@requireCheck(function() { | ||
if (this.isDisposed) { | ||
@@ -22,0 +22,0 @@ Log.warn("only can dispose once"); |
@@ -20,3 +20,3 @@ var __extends = (this && this.__extends) || (function () { | ||
import { Stream } from "../core/Stream"; | ||
import { require, assert } from "../definition/typescript/decorator/contract"; | ||
import { requireCheck, assert } from "../definition/typescript/decorator/contract"; | ||
import { JudgeUtils } from "../JudgeUtils"; | ||
@@ -60,3 +60,3 @@ import { fromPromise } from "../global/Operator"; | ||
__decorate([ | ||
require(function (innerSource) { | ||
requireCheck(function (innerSource) { | ||
assert(innerSource instanceof Stream || JudgeUtils.isPromise(innerSource), Log.info.FUNC_MUST_BE("innerSource", "Stream or Promise")); | ||
@@ -63,0 +63,0 @@ }) |
@@ -7,3 +7,3 @@ import { Log } from "wonder-commonlib/dist/es2015/Log"; | ||
import { GroupDisposable } from "../Disposable/GroupDisposable"; | ||
import { require, assert } from "../definition/typescript/decorator/contract"; | ||
import { requireCheck, assert } from "../definition/typescript/decorator/contract"; | ||
import { JudgeUtils } from "../JudgeUtils"; | ||
@@ -31,3 +31,3 @@ import { fromPromise } from "../global/Operator"; | ||
@require(function(innerSource: any) { | ||
@requireCheck(function(innerSource: any) { | ||
assert(innerSource instanceof Stream || JudgeUtils.isPromise(innerSource), Log.info.FUNC_MUST_BE("innerSource", "Stream or Promise")); | ||
@@ -34,0 +34,0 @@ |
@@ -22,3 +22,3 @@ var __extends = (this && this.__extends) || (function () { | ||
import { fromPromise } from "../global/Operator"; | ||
import { require, assert } from "../definition/typescript/decorator/contract"; | ||
import { requireCheck, assert } from "../definition/typescript/decorator/contract"; | ||
var MergeObserver = (function (_super) { | ||
@@ -75,3 +75,3 @@ __extends(MergeObserver, _super); | ||
__decorate([ | ||
require(function (innerSource) { | ||
requireCheck(function (innerSource) { | ||
assert(innerSource instanceof Stream || JudgeUtils.isPromise(innerSource), Log.info.FUNC_MUST_BE("innerSource", "Stream or Promise")); | ||
@@ -78,0 +78,0 @@ }) |
@@ -9,3 +9,3 @@ import { Log } from "wonder-commonlib/dist/es2015/Log"; | ||
import { fromPromise } from "../global/Operator"; | ||
import { require, assert } from "../definition/typescript/decorator/contract"; | ||
import { requireCheck, assert } from "../definition/typescript/decorator/contract"; | ||
@@ -45,3 +45,3 @@ export class MergeObserver extends Observer { | ||
@require(function(innerSource: any) { | ||
@requireCheck(function(innerSource: any) { | ||
assert(innerSource instanceof Stream || JudgeUtils.isPromise(innerSource), Log.info.FUNC_MUST_BE("innerSource", "Stream or Promise")); | ||
@@ -48,0 +48,0 @@ |
@@ -19,3 +19,3 @@ var __extends = (this && this.__extends) || (function () { | ||
import { BaseStream } from "./BaseStream"; | ||
import { require, assert } from "../definition/typescript/decorator/contract"; | ||
import { requireCheck, assert } from "../definition/typescript/decorator/contract"; | ||
import { SingleDisposable } from "../Disposable/SingleDisposable"; | ||
@@ -49,3 +49,3 @@ import { root } from "../global/Variable"; | ||
__decorate([ | ||
require(function (time, scheduler) { | ||
requireCheck(function (time, scheduler) { | ||
assert(time > 0, Log.info.FUNC_SHOULD("time", "> 0")); | ||
@@ -52,0 +52,0 @@ }) |
import { Log } from "wonder-commonlib/dist/es2015/Log"; | ||
import { BaseStream } from "./BaseStream"; | ||
import { require, assert } from "../definition/typescript/decorator/contract"; | ||
import { requireCheck, assert } from "../definition/typescript/decorator/contract"; | ||
import { Scheduler } from "../core/Scheduler"; | ||
@@ -10,3 +10,3 @@ import { IObserver } from "../observer/IObserver"; | ||
export class TimeoutStream extends BaseStream { | ||
@require(function(time: number, scheduler: Scheduler) { | ||
@requireCheck(function(time: number, scheduler: Scheduler) { | ||
assert(time > 0, Log.info.FUNC_SHOULD("time", "> 0")); | ||
@@ -13,0 +13,0 @@ }) |
@@ -14,3 +14,3 @@ // Generated by dts-bundle v0.7.2 | ||
export { Stream } from "wonder-frp/dist/es2015/core/Stream"; | ||
export { assert, require, ensure, requireGetter, requireSetter, ensureGetter, ensureSetter, invariant } from "wonder-frp/dist/es2015/definition/typescript/decorator/contract"; | ||
export { assert, requireCheck, ensure, requireGetter, requireSetter, ensureGetter, ensureSetter, invariant } from "wonder-frp/dist/es2015/definition/typescript/decorator/contract"; | ||
export { GroupDisposable } from "wonder-frp/dist/es2015/Disposable/GroupDisposable"; | ||
@@ -180,3 +180,3 @@ export { IDisposable } from "wonder-frp/dist/es2015/Disposable/IDisposable"; | ||
export function assert(cond: boolean, message?: string): void; | ||
export function require(InFunc: any): (target: any, name: any, descriptor: any) => any; | ||
export function requireCheck(InFunc: any): (target: any, name: any, descriptor: any) => any; | ||
export function ensure(OutFunc: any): (target: any, name: any, descriptor: any) => any; | ||
@@ -183,0 +183,0 @@ export function requireGetter(InFunc: any): (target: any, name: any, descriptor: any) => any; |
@@ -91,3 +91,3 @@ // Generated by dts-bundle v0.7.2 | ||
export function assert(cond: boolean, message?: string): void; | ||
export function require(InFunc: any): (target: any, name: any, descriptor: any) => any; | ||
export function requireCheck(InFunc: any): (target: any, name: any, descriptor: any) => any; | ||
export function ensure(OutFunc: any): (target: any, name: any, descriptor: any) => any; | ||
@@ -94,0 +94,0 @@ export function requireGetter(InFunc: any): (target: any, name: any, descriptor: any) => any; |
{ | ||
"name": "wonder-frp", | ||
"version": "0.1.13", | ||
"version": "0.1.14", | ||
"main": "dist/wdFrp.js", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
1120839
2