@waiting/shared-types
Advanced tools
Comparing version 23.2.1 to 23.4.0
@@ -8,3 +8,3 @@ export interface Func { | ||
*/ | ||
export type MethodType = (...input: any[]) => (any | Promise<any>); | ||
export type MethodType<ArgsType extends unknown[] = any[], ReturnType = any | Promise<any>> = (...input: ArgsType) => ReturnType; | ||
/** | ||
@@ -11,0 +11,0 @@ * ReturnType is unknown |
{ | ||
"name": "@waiting/shared-types", | ||
"author": "waiting", | ||
"version": "23.2.1", | ||
"version": "23.4.0", | ||
"description": "shared typescript types", | ||
@@ -56,3 +56,3 @@ "keywords": [ | ||
"build": "npm run tsc && tsc-alias && npm run rp", | ||
"build:test": "tsc -p test/tsconfig.json", | ||
"build:unit": "tsc -p test/tsconfig.json", | ||
"clean": "npm run clean:lock && npm run clean:dist && npm run clean:log", | ||
@@ -66,3 +66,3 @@ "clean:cache": "rm -rf .eslintcache .tsbuildinfo", | ||
"lint:nofix": "eslint --cache src test", | ||
"pretest": "npm run build && npm run build:test", | ||
"pretest": "npm run build && npm run build:unit", | ||
"rp": "tsx bin-hashbang.js", | ||
@@ -72,3 +72,3 @@ "test": "cross-env NODE_ENV=test TS_NODE_PROJECT=test/tsconfig.json mocha --jobs=4", | ||
}, | ||
"gitHead": "c24e67bdd445565f85ec5a65c66c1d93d45cebd7" | ||
"gitHead": "ea85cf374d4f3e88b3c3ba32bdbd1b2e702f74b2" | ||
} |
@@ -13,11 +13,7 @@ /* eslint-disable @typescript-eslint/no-redundant-type-constituents */ | ||
*/ | ||
export type MethodType = (...input: any[]) => (any | Promise<any>) | ||
export type MethodType<ArgsType extends unknown[] = any[], ReturnType = any | Promise<any>> = (...input: ArgsType) => ReturnType | ||
/** | ||
* ReturnType is unknown | ||
*/ | ||
export type MethodTypeUnknown< | ||
ArgsType extends any[] = any[], | ||
ReturnType extends unknown = unknown, | ||
> = (...input: ArgsType) => ReturnType | ||
export type MethodTypeUnknown<ArgsType extends any[] = any[], ReturnType extends unknown = unknown> = (...input: ArgsType) => ReturnType | ||
@@ -27,6 +23,3 @@ /** | ||
*/ | ||
export type AsyncMethodType< | ||
ArgsType extends any[] = any[], | ||
ResultType extends unknown = unknown, | ||
> = (...input: ArgsType) => Promise<ResultType> | ||
export type AsyncMethodType<ArgsType extends any[] = any[], ResultType extends unknown = unknown> = (...input: ArgsType) => Promise<ResultType> | ||
@@ -24,2 +24,3 @@ { | ||
"##/*": ["src/*"], | ||
"#a/*": ["src/app/*"], | ||
"#@/*": ["test/*"] | ||
@@ -47,2 +48,3 @@ }, | ||
"dist", | ||
"fixtures", | ||
"node_modules*", | ||
@@ -49,0 +51,0 @@ "**/*.d.ts", |
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
76094
1315