rc-js-util-globals
Advanced tools
Comparing version 0.3.0 to 0.5.0
@@ -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; | ||
} |
{ | ||
"name": "rc-js-util-globals", | ||
"version": "0.3.0", | ||
"version": "0.5.0", | ||
"license": "MIT" | ||
} |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
2200
64
0