Socket
Socket
Sign inDemoInstall

mobx-wrap-request

Package Overview
Dependencies
2
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.2.0 to 2.2.1

16

dist/index.d.ts

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

export * from "wrap-request";
import { AnnotationsMap } from 'mobx';
import * as pkg from 'wrap-request';
declare const originalWrapRequest: typeof pkg.wrapRequest;
declare type NoInfer<T> = [T][T extends any ? 0 : never];
declare type WrapRequestParams = Parameters<typeof originalWrapRequest>;
declare type RequestFn = WrapRequestParams[0];
declare type RequestOptions = Parameters<RequestFn>[1];
declare type Options = WrapRequestParams[1];
export { RequestFn, Options, RequestOptions };
declare function buildNewWrapRequest(overrides: AnnotationsMap<pkg.WrapRequest, NoInfer<PropertyKey>>, ...args: WrapRequestParams): pkg.WrapRequest<unknown, unknown, unknown, unknown>;
declare function newWrapRequest(...args: WrapRequestParams): ReturnType<typeof buildNewWrapRequest>;
declare namespace newWrapRequest {
var withObservableOverrides: (overrides: AnnotationsMap<pkg.WrapRequest<any, any, any, any>, string | number | symbol>) => (request: pkg.RequestFn<unknown, unknown>, options?: pkg.Options<unknown, unknown, unknown> | undefined) => pkg.WrapRequest<unknown, unknown, unknown, unknown>;
}
export { newWrapRequest as wrapRequest };

35

dist/index.js
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.wrapRequest = void 0;
const mobx_1 = require("mobx");
const pkg = require("wrap-request");
__exportStar(require("wrap-request"), exports);
const originalWrapRequest = pkg.wrapRequest;
pkg.wrapRequest = function (...args) {
function buildNewWrapRequest(overrides, ...args) {
const res = originalWrapRequest(...args);
mobx_1.makeAutoObservable(res, {
mobx_1.makeAutoObservable(res, overrides);
return res;
}
function newWrapRequest(...args) {
return buildNewWrapRequest({
reset: mobx_1.action,
request: mobx_1.action
});
return res;
};
request: mobx_1.action,
}, ...args);
}
exports.wrapRequest = newWrapRequest;
function withObservableOverrides(overrides) {
return (...args) => {
return buildNewWrapRequest(overrides, ...args);
};
}
newWrapRequest.withObservableOverrides = withObservableOverrides;
pkg.wrapRequest = newWrapRequest;
//# sourceMappingURL=index.js.map
{
"name": "mobx-wrap-request",
"version": "2.2.0",
"version": "2.2.1",
"description": "a request-wrapper for async operations powered by mobx",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc