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

@blocksuite/global

Package Overview
Dependencies
Maintainers
5
Versions
1225
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blocksuite/global - npm Package Compare versions

Comparing version 0.5.0-20230302104138-788dae4 to 0.5.0-20230302142916-8e090d3

2

dist/utils.d.ts

@@ -22,3 +22,3 @@ import type { BaseBlockModel } from '@blocksuite/store';

type Allowed = void | null | undefined | boolean | number | string | unknown[] | object;
export declare function assertEquals<T extends Allowed, U extends T>(val: T, expected: U): asserts val is U;
export declare function assertEquals<T extends Allowed, U extends T>(val: T, expected: U, message?: string): asserts val is U;
export declare function isEqual<T extends Allowed, U extends T>(val: T, expected: U): boolean;

@@ -25,0 +25,0 @@ export declare function sleep(ms: number): Promise<void>;

@@ -38,5 +38,5 @@ export { DisposableGroup, flattenDisposable } from './utils/disposable.js';

export const isNonTextBlock = (model) => matchFlavours(model, nonTextBlock);
export function assertEquals(val, expected) {
export function assertEquals(val, expected, message = 'val is not same as expected') {
if (!isEqual(val, expected)) {
throw new Error('val is not same as expected');
throw new Error(message);
}

@@ -43,0 +43,0 @@ }

{
"name": "@blocksuite/global",
"version": "0.5.0-20230302104138-788dae4",
"version": "0.5.0-20230302142916-8e090d3",
"types": "./index.d.ts",

@@ -5,0 +5,0 @@ "type": "module",

@@ -77,6 +77,7 @@ import type { BaseBlockModel } from '@blocksuite/store';

val: T,
expected: U
expected: U,
message = 'val is not same as expected'
): asserts val is U {
if (!isEqual(val, expected)) {
throw new Error('val is not same as expected');
throw new Error(message);
}

@@ -83,0 +84,0 @@ }

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