Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@types/rewire
Advanced tools
TypeScript definitions for rewire
npm install --save @types/rewire
This package contains type definitions for rewire (https://github.com/jhnns/rewire).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/rewire.
declare namespace RewireInterfaces {
interface RewiredModule {
/**
* Takes all enumerable keys of obj as variable names and sets the values respectively. Returns a function which can be called to revert the change.
*/
__set__(obj: { [variable: string]: any }): () => void;
/**
* Sets the internal variable name to the given value. Returns a function which can be called to revert the change.
*/
__set__(name: string, value: any): () => void;
/**
* Returns the private variable with the given name.
*/
__get__<T = any>(name: string): T;
/**
* Returns a function which - when being called - sets obj, executes the given callback and reverts obj. If callback returns a promise, obj is only reverted after
* the promise has been resolved or rejected. For your convenience the returned function passes the received promise through.
*/
__with__(obj: { [variable: string]: any }): (callback: () => any) => any;
}
}
/**
* Returns a rewired version of the module found at filename. Use rewire() exactly like require().
*/
declare function rewire<T = { [key: string]: any }>(filename: string): RewireInterfaces.RewiredModule & T;
export = rewire;
These definitions were written by Borislav Zhivkov, and Federico Caselli.
FAQs
TypeScript definitions for rewire
The npm package @types/rewire receives a total of 28,919 weekly downloads. As such, @types/rewire popularity was classified as popular.
We found that @types/rewire demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.