Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

alien-signals

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alien-signals - npm Package Compare versions

Comparing version 0.3.2 to 0.4.0

2

package.json
{
"name": "alien-signals",
"version": "0.3.2",
"version": "0.4.0",
"license": "MIT",

@@ -5,0 +5,0 @@ "packageManager": "pnpm@9.12.0",

@@ -1,2 +0,2 @@

import { DirtyLevels, IComputed, Link } from './system.js';
import { IComputed, Link, SubscriberFlags } from './system.js';
export interface ISignal<T = any> {

@@ -9,9 +9,9 @@ get(): T;

cachedValue: T | undefined;
version: number;
subs: Link | undefined;
subsTail: Link | undefined;
lastTrackedId: number;
deps: Link | undefined;
depsTail: Link | undefined;
trackId: number;
dirtyLevel: DirtyLevels;
canPropagate: boolean;
flags: SubscriberFlags;
constructor(getter: (cachedValue?: T) => T);

@@ -18,0 +18,0 @@ get(): T;

@@ -1,2 +0,7 @@

import { Dependency, DirtyLevels, IEffect, Link } from './system.js';
import { Dependency, IEffect, Link, Subscriber, SubscriberFlags } from './system.js';
export declare let activeSub: Subscriber | undefined;
export declare let activeTrackId: number;
export declare let lastTrackId: number;
export declare function setActiveSub(sub: Subscriber | undefined, trackId: number): void;
export declare function nextTrackId(): number;
export declare function effect(fn: () => void): Effect<void>;

@@ -8,7 +13,6 @@ export declare class Effect<T = any> implements IEffect, Dependency {

subsTail: Link | undefined;
lastTrackedId: number;
deps: Link | undefined;
depsTail: Link | undefined;
trackId: number;
dirtyLevel: DirtyLevels;
canPropagate: boolean;
flags: SubscriberFlags;
constructor(fn: () => T);

@@ -15,0 +19,0 @@ notify(): void;

@@ -1,2 +0,2 @@

import { DirtyLevels, Link, Subscriber } from './system.js';
import { Link, Subscriber, SubscriberFlags } from './system.js';
export declare let activeEffectScope: EffectScope | undefined;

@@ -7,5 +7,3 @@ export declare function effectScope(): EffectScope;

depsTail: Link | undefined;
trackId: number;
dirtyLevel: DirtyLevels;
canPropagate: boolean;
flags: SubscriberFlags;
notify(): void;

@@ -12,0 +10,0 @@ run<T>(fn: () => T): T;

@@ -12,2 +12,3 @@ import { ISignal } from './computed.js';

subsTail: Link | undefined;
lastTrackedId: number;
constructor(currentValue: T);

@@ -14,0 +15,0 @@ get(): NonNullable<T>;

@@ -6,2 +6,3 @@ export interface IEffect extends Subscriber {

export interface IComputed extends Dependency, Subscriber {
version: number;
update(): boolean;

@@ -12,7 +13,6 @@ }

subsTail: Link | undefined;
lastTrackedId: number;
}
export interface Subscriber {
trackId: number;
canPropagate: boolean;
dirtyLevel: DirtyLevels;
flags: SubscriberFlags;
deps: Link | undefined;

@@ -24,3 +24,3 @@ depsTail: Link | undefined;

sub: Subscriber | IComputed | (Dependency & IEffect) | IEffect;
trackId: number;
version: number;
prevSub: Link | undefined;

@@ -30,25 +30,18 @@ nextSub: Link | undefined;

}
export declare const enum DirtyLevels {
export declare const enum SubscriberFlags {
None = 0,
SideEffectsOnly = 1,
MaybeDirty = 2,
Dirty = 3
Tracking = 1,
CanPropagate = 2,
RunInnerEffects = 4,
ToCheckDirty = 8,
Dirty = 16
}
export declare const System: {
activeSub: Subscriber | undefined;
activeTrackId: number;
batchDepth: number;
lastTrackId: number;
queuedEffects: IEffect | undefined;
queuedEffectsTail: IEffect | undefined;
linkPool: Link | undefined;
};
export declare function startBatch(): void;
export declare function endBatch(): void;
export declare function drainQueuedEffects(): void;
export declare function link(dep: Dependency, sub: Subscriber, trackId: number): void;
export declare function link(dep: Dependency, sub: Subscriber): Link;
export declare function propagate(subs: Link): void;
export declare function checkDirty(deps: Link): boolean;
export declare function startTrack(sub: Subscriber): number;
export declare function startTrack(sub: Subscriber): void;
export declare function endTrack(sub: Subscriber): void;
export declare function clearTrack(link: Link): void;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc