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

rc-js-util-globals

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-js-util-globals - npm Package Compare versions

Comparing version 0.3.0 to 0.5.0

68

index.d.ts

@@ -0,5 +1,71 @@

/**
* This can be set in dead code removal tools to trim debug code.
*/
declare const DEBUG_MODE: boolean;
/**
* Prevents hitting assert / error breakpoints, useful when debugging tests.
*/
declare const DEBUG_DISABLE_BREAKPOINT: boolean;
/**
* Enable verbose logging.
*/
declare const DEBUG_VERBOSE: boolean;
/**
* Disable debug checks that do not run in constant time.
*/
declare const DEBUG_DISABLE_EXPENSIVE_CHECKS: boolean;
declare const DEBUG_PEDANTIC: boolean;
/**
* Checks that are a wee bit autistic.
*/
declare const DEBUG_PEDANTIC: boolean;
/**
* Enable verbose logging of memory allocations, very chatty.
*/
declare const DEBUG_VERBOSE_MEMORY_MANAGEMENT: boolean;
declare namespace RcJsUtilDebug
{
export interface IStore<T>
{
setValue(listener: object, value: T): void;
getValue(listener: object): T;
}
export interface ISharedObject
{
isStatic: boolean;
getPtr(): number;
}
export type TListener<TArgs extends unknown[]> = (...args: TArgs) => void;
export interface IMulticastEvent<TArgs extends unknown[]>
{
addListener(listener: TListener<TArgs>): void;
removeListener(listener: TListener<TArgs>): void;
emit(...args: TArgs): void;
}
export interface IDebugSharedObjectLifeCycleChecks
{
registerForFinalizationCheck(sharedObject: ISharedObject): void;
markReadyForFinalize(sharedObject: ISharedObject): void;
}
interface IDebugProtectedView<_T extends object>
{
/**
* Invalidates all previous views.
*/
invalidate(): void;
/**
* Create a proxy to the view, if invalidate called then access of non `safeKeys` will cause a debug error.
*/
createProtectedView<T extends object>(view: T): T;
}
export const onAllocate: IMulticastEvent<[]>;
export const protectedViews: IStore<IDebugProtectedView<object>>;
export const error: (message: string) => boolean;
export const sharedObjectLifeCycleChecks: IDebugSharedObjectLifeCycleChecks;
}

2

package.json
{
"name": "rc-js-util-globals",
"version": "0.3.0",
"version": "0.5.0",
"license": "MIT"
}
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