New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@hazae41/box

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hazae41/box - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

dist/types/index.d.ts

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

export { Box, BoxMovedError } from './mods/box/box.js';
export { Box, BoxMovedError, Copiable } from './mods/box/box.js';

@@ -8,2 +8,9 @@ import { Result } from '@hazae41/result';

}
interface Copiable<T> {
copy(): T;
}
declare namespace Copiable {
type Infer<T> = Copiable<Copied<T>>;
type Copied<T> = T extends Copiable<infer U> ? U : never;
}
declare class Box<T extends Disposable> {

@@ -48,7 +55,13 @@ #private;

* Move the inner value to a new box and set this one as moved
* @returns Ok<T> or Err<BoxMovedError> if already moved
* @returns Ok<Box<T>> or Err<BoxMovedError> if already moved
*/
tryMove(): Result<Box<T>, BoxMovedError>;
/**
* Create a new Box that's already moved, and keep this one as is
* @returns Box<T>
*/
greed(): Box<T>;
static copy<T extends Disposable & Copiable.Infer<T>>(inner: Box<T>): Copiable.Copied<T>;
}
export { Box, BoxMovedError };
export { Box, BoxMovedError, Copiable };
{
"type": "module",
"name": "@hazae41/box",
"version": "1.0.0",
"version": "1.0.1",
"description": "Rust-like Box for TypeScript",

@@ -6,0 +6,0 @@ "homepage": "https://github.com/hazae41/box",

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

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