@digshare/script
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -26,1 +26,6 @@ /// <reference types="node" /> | ||
export declare type Script<TPayload, TStorage extends object> = (payload: TPayload, context: ScriptContext<TStorage>) => Promise<ScriptMessage | void> | AsyncGenerator<ScriptMessage, void>; | ||
/** | ||
* 类型辅助函数,无其他用途 | ||
* @param fn<payload, storage> | ||
*/ | ||
export declare function script<TPayload, TStorage extends object>(fn: Script<TPayload, TStorage>): Script<TPayload, TStorage>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.script = void 0; | ||
/** | ||
* 类型辅助函数,无其他用途 | ||
* @param fn<payload, storage> | ||
*/ | ||
function script(fn) { | ||
return fn; | ||
} | ||
exports.script = script; | ||
//# sourceMappingURL=script.js.map |
@@ -102,2 +102,7 @@ // Generated by dts-bundle-generator v6.5.0 | ||
export declare type Script<TPayload, TStorage extends object> = (payload: TPayload, context: ScriptContext<TStorage>) => Promise<ScriptMessage | void> | AsyncGenerator<ScriptMessage, void>; | ||
/** | ||
* 类型辅助函数,无其他用途 | ||
* @param fn<payload, storage> | ||
*/ | ||
export declare function script<TPayload, TStorage extends object>(fn: Script<TPayload, TStorage>): Script<TPayload, TStorage>; | ||
export declare type DevRunOptions<TPayload, TStorage extends object> = { | ||
@@ -104,0 +109,0 @@ dryRun?: boolean; |
{ | ||
"name": "@digshare/script", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"author": "Chengdu Enverse Technology Co., Ltd.", | ||
@@ -5,0 +5,0 @@ "main": "bld/library/index.js", |
@@ -33,1 +33,11 @@ import {ScriptContext} from './context'; | ||
) => Promise<ScriptMessage | void> | AsyncGenerator<ScriptMessage, void>; | ||
/** | ||
* 类型辅助函数,无其他用途 | ||
* @param fn<payload, storage> | ||
*/ | ||
export function script<TPayload, TStorage extends object>( | ||
fn: Script<TPayload, TStorage>, | ||
): Script<TPayload, TStorage> { | ||
return fn; | ||
} |
Sorry, the diff of this file is not supported yet
41560
936