@quilted/threads
Advanced tools
Comparing version 0.0.0-preview-20230807232939 to 0.0.0-preview-20230808005228
export { createThreadSignal } from './signals/create.ts'; | ||
export { acceptThreadSignal } from './signals/accept.ts'; | ||
export { acceptThreadSignal, isThreadSignal } from './signals/accept.ts'; | ||
export type { ThreadSignal } from './signals/types.ts'; | ||
//# sourceMappingURL=signals.d.ts.map |
@@ -18,2 +18,6 @@ import { type Signal } from '@preact/signals-core'; | ||
}): Signal<T>; | ||
/** | ||
* Returns `true` if the passed object is a `ThreadSignal`. | ||
*/ | ||
export declare function isThreadSignal<T = unknown>(value?: unknown): value is ThreadSignal<T>; | ||
//# sourceMappingURL=accept.d.ts.map |
# @quilted/threads | ||
## 0.0.0-preview-20230807232939 | ||
## 0.0.0-preview-20230808005228 | ||
### Major Changes | ||
- Clean up threads for a first version | ||
### Patch Changes | ||
- Update signals dependency and add dedicated package for signal utilities | ||
- Fix missing `isThreadSignal()` utility | ||
- First major version for `@quilted/events` | ||
## 1.0.1 | ||
- Simplify thread creation and add helpers for transferring signals over threads | ||
### Patch Changes | ||
- Updated dependencies []: | ||
- @quilted/events@0.0.0-preview-20230807232939 | ||
- [`c3f3298b`](https://github.com/lemonmade/quilt/commit/c3f3298b4458d939c0bfc7b83fe6ce120f4fbde8) Thanks [@lemonmade](https://github.com/lemonmade)! - Fix missing `isThreadSignal()` utility | ||
@@ -20,0 +15,0 @@ ## 1.0.0 |
@@ -5,3 +5,3 @@ { | ||
"type": "module", | ||
"version": "0.0.0-preview-20230807232939", | ||
"version": "0.0.0-preview-20230808005228", | ||
"license": "MIT", | ||
@@ -46,3 +46,3 @@ "engines": { | ||
"dependencies": { | ||
"@quilted/events": "0.0.0-preview-20230807232939" | ||
"@quilted/events": "^1.0.0" | ||
}, | ||
@@ -49,0 +49,0 @@ "peerDependencies": { |
export {createThreadSignal} from './signals/create.ts'; | ||
export {acceptThreadSignal} from './signals/accept.ts'; | ||
export {acceptThreadSignal, isThreadSignal} from './signals/accept.ts'; | ||
export type {ThreadSignal} from './signals/types.ts'; |
@@ -59,1 +59,15 @@ import {signal as createSignal, type Signal} from '@preact/signals-core'; | ||
} | ||
/** | ||
* Returns `true` if the passed object is a `ThreadSignal`. | ||
*/ | ||
export function isThreadSignal<T = unknown>( | ||
value?: unknown, | ||
): value is ThreadSignal<T> { | ||
return ( | ||
value != null && | ||
typeof value === 'object' && | ||
'initial' in value && | ||
typeof (value as any).start === 'function' | ||
); | ||
} |
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
247630
4356
+ Added@quilted/events@1.0.1(transitive)
- Removed@quilted/events@0.0.0-preview-20230807232939(transitive)
Updated@quilted/events@^1.0.0