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

@dhmk/atom

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dhmk/atom - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

1

esm/atom.d.ts

@@ -31,2 +31,3 @@ export declare class _Atom<T> {

export declare function runInAction<T>(fn: () => T): T;
export declare const run: typeof runInAction;
export declare function atTransactionEnd(fn: (isInTransaction: any) => any): void;

@@ -33,0 +34,0 @@ export declare const deepReadonly: <T>(x: T) => DeepReadonly<T>;

@@ -348,2 +348,4 @@ // global state

}
// convenient alias
export var run = runInAction;
// export function action<A extends unknown[], T>(fn: (...args: A) => T) {

@@ -350,0 +352,0 @@ // return function (...args: A) {

3

esm/helpers.d.ts
import { WritableAtom, Atom, NotAtom, AtomOptions } from "./atom";
export interface ObjectAtom<T> extends WritableAtom<T> {
merge(arg: (prev: T) => T): void;
merge(arg: (prev: T) => Partial<T>): void;
merge(arg: Partial<T>): void;
merge(arg: (prev: T) => Partial<T>): void;
}

@@ -6,0 +7,0 @@ export declare function objectAtom<T extends object>(value: T, options?: AtomOptions<T>): ObjectAtom<T>;

@@ -31,2 +31,3 @@ export declare class _Atom<T> {

export declare function runInAction<T>(fn: () => T): T;
export declare const run: typeof runInAction;
export declare function atTransactionEnd(fn: (isInTransaction: any) => any): void;

@@ -33,0 +34,0 @@ export declare const deepReadonly: <T>(x: T) => DeepReadonly<T>;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.asAtom = exports.deepReadonly = exports.atTransactionEnd = exports.runInAction = exports.untracked = exports.observe = exports.atom = exports._Atom = void 0;
exports.asAtom = exports.deepReadonly = exports.atTransactionEnd = exports.run = exports.runInAction = exports.untracked = exports.observe = exports.atom = exports._Atom = void 0;
// global state

@@ -355,2 +355,4 @@ var g_pendingAtoms = [];

exports.runInAction = runInAction;
// convenient alias
exports.run = runInAction;
// export function action<A extends unknown[], T>(fn: (...args: A) => T) {

@@ -357,0 +359,0 @@ // return function (...args: A) {

import { WritableAtom, Atom, NotAtom, AtomOptions } from "./atom";
export interface ObjectAtom<T> extends WritableAtom<T> {
merge(arg: (prev: T) => T): void;
merge(arg: (prev: T) => Partial<T>): void;
merge(arg: Partial<T>): void;
merge(arg: (prev: T) => Partial<T>): void;
}

@@ -6,0 +7,0 @@ export declare function objectAtom<T extends object>(value: T, options?: AtomOptions<T>): ObjectAtom<T>;

{
"name": "@dhmk/atom",
"version": "1.0.5",
"version": "1.0.6",
"description": "Lightweight mobx-like observable values, computed values and side-effects",

@@ -5,0 +5,0 @@ "keywords": [

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