@quilted/threads
Advanced tools
Comparing version 0.1.10 to 0.1.11
@@ -1,2 +0,2 @@ | ||
export declare type ThreadAbortSignal = { | ||
export type ThreadAbortSignal = { | ||
aborted: true; | ||
@@ -3,0 +3,0 @@ start?: never; |
import type { RELEASE_METHOD, RETAIN_METHOD, ENCODE_METHOD, RETAINED_BY } from './constants'; | ||
export declare type Thread<Target> = ThreadCallable<Target>; | ||
export type Thread<Target> = ThreadCallable<Target>; | ||
export interface ThreadTarget { | ||
@@ -12,3 +12,3 @@ send(message: any, transferables?: Transferable[]): void; | ||
} | ||
export declare type ThreadExposable<T> = { | ||
export type ThreadExposable<T> = { | ||
[K in keyof T]: T[K] extends (...args: infer Args) => infer ReturnType ? ThreadExposableFunction<Args, ReturnType> : never; | ||
@@ -19,10 +19,10 @@ }; | ||
} | ||
export declare type ThreadCallable<T> = { | ||
export type ThreadCallable<T> = { | ||
[K in keyof T]: T[K] extends (...args: infer Args) => infer ReturnType ? ThreadCallableFunction<Args, ReturnType> : never; | ||
}; | ||
export declare type MaybePromise<T> = T extends Promise<any> ? T : T | Promise<T>; | ||
export declare type ThreadSafeReturnType<T> = T extends AsyncGenerator<any, any, any> ? T : T extends Generator<infer T, infer R, infer N> ? AsyncGenerator<T, R, N> : T extends Promise<any> ? T : T extends infer U | Promise<infer U> ? Promise<U> : T extends (...args: infer Args) => infer TypeReturned ? (...args: Args) => ThreadSafeReturnType<TypeReturned> : T extends (infer ArrayElement)[] ? ThreadSafeReturnType<ArrayElement>[] : T extends readonly (infer ArrayElement)[] ? readonly ThreadSafeReturnType<ArrayElement>[] : T extends object ? { | ||
export type MaybePromise<T> = T extends Promise<any> ? T : T | Promise<T>; | ||
export type ThreadSafeReturnType<T> = T extends AsyncGenerator<any, any, any> ? T : T extends Generator<infer T, infer R, infer N> ? AsyncGenerator<T, R, N> : T extends Promise<any> ? T : T extends infer U | Promise<infer U> ? Promise<U> : T extends (...args: infer Args) => infer TypeReturned ? (...args: Args) => ThreadSafeReturnType<TypeReturned> : T extends (infer ArrayElement)[] ? ThreadSafeReturnType<ArrayElement>[] : T extends readonly (infer ArrayElement)[] ? readonly ThreadSafeReturnType<ArrayElement>[] : T extends object ? { | ||
[K in keyof T]: ThreadSafeReturnType<T[K]>; | ||
} : T; | ||
export declare type ThreadSafeArgument<T> = T extends (...args: infer Args) => infer TypeReturned ? TypeReturned extends Promise<any> ? (...args: Args) => TypeReturned : TypeReturned extends AsyncGenerator<any, any, any> ? (...args: Args) => TypeReturned : TypeReturned extends Generator<infer T, infer R, infer N> ? (...args: Args) => AsyncGenerator<T, R, N> : TypeReturned extends boolean ? (...args: Args) => boolean | Promise<boolean> : (...args: Args) => TypeReturned | Promise<TypeReturned> : { | ||
export type ThreadSafeArgument<T> = T extends (...args: infer Args) => infer TypeReturned ? TypeReturned extends Promise<any> ? (...args: Args) => TypeReturned : TypeReturned extends AsyncGenerator<any, any, any> ? (...args: Args) => TypeReturned : TypeReturned extends Generator<infer T, infer R, infer N> ? (...args: Args) => AsyncGenerator<T, R, N> : TypeReturned extends boolean ? (...args: Args) => boolean | Promise<boolean> : (...args: Args) => TypeReturned | Promise<TypeReturned> : { | ||
[K in keyof T]: ThreadSafeArgument<T[K]>; | ||
@@ -55,3 +55,3 @@ }; | ||
} | ||
export declare type AnyFunction = Function; | ||
export type AnyFunction = Function; | ||
//# sourceMappingURL=types.d.ts.map |
# @quilted/threads | ||
## 0.1.11 | ||
### Patch Changes | ||
- [`8f1d275b`](https://github.com/lemonmade/quilt/commit/8f1d275b6de0abbc6f61bcd5401555f6480eb474) Thanks [@lemonmade](https://github.com/lemonmade)! - Remove need for @babel/runtime peer dependency | ||
## 0.1.10 | ||
@@ -4,0 +10,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"type": "module", | ||
"version": "0.1.10", | ||
"version": "0.1.11", | ||
"license": "MIT", | ||
@@ -34,12 +34,4 @@ "engines": { | ||
}, | ||
"peerDependencies": { | ||
"@babel/runtime": ">=7.0.0 <8.0.0" | ||
}, | ||
"peerDependenciesMeta": { | ||
"@babel/runtime": { | ||
"optional": true | ||
} | ||
}, | ||
"devDependencies": { | ||
"@quilted/testing": "0.1.4" | ||
"@quilted/testing": "0.1.5" | ||
}, | ||
@@ -46,0 +38,0 @@ "eslintConfig": { |
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 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 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 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
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
148206
1
77
2628