Socket
Socket
Sign inDemoInstall

@reach/utils

Package Overview
Dependencies
Maintainers
4
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@reach/utils - npm Package Compare versions

Comparing version 0.8.6 to 0.9.0

4

dist/index.d.ts
import React from "react";
import { As, AssignableRef, ComponentWithAs, ComponentWithForwardedRef, DistributiveOmit, PropsFromAs, PropsWithAs, SingleOrArray } from "./types";
import { As, AssignableRef, ComponentWithAs, ComponentWithForwardedRef, DistributiveOmit, PropsFromAs, PropsWithAs, SingleOrArray, ThenArg } from "./types";
/**

@@ -212,2 +212,2 @@ * React currently throws a warning when using useLayoutEffect on the server.

export declare function wrapEvent<EventType extends React.SyntheticEvent | Event>(theirHandler: ((event: EventType) => any) | undefined, ourHandler: (event: EventType) => any): (event: EventType) => any;
export { As, AssignableRef, ComponentWithAs, ComponentWithForwardedRef, DistributiveOmit, PropsFromAs, PropsWithAs, SingleOrArray, };
export { As, AssignableRef, ComponentWithAs, ComponentWithForwardedRef, DistributiveOmit, PropsFromAs, PropsWithAs, SingleOrArray, ThenArg, };

@@ -0,8 +1,7 @@

'use strict';
'use strict'
if (process.env.NODE_ENV === 'production') {
module.exports = require('./utils.cjs.production.min.js')
module.exports = require('./utils.cjs.production.min.js');
} else {
module.exports = require('./utils.cjs.development.js')
}
module.exports = require('./utils.cjs.development.js');
}

@@ -50,2 +50,16 @@ import * as React from "react";

export declare type ComponentWithForwardedRef<ElementType extends React.ElementType, ComponentProps> = React.ForwardRefExoticComponent<ComponentProps & React.HTMLProps<React.ElementType<ElementType>> & React.ComponentPropsWithRef<ElementType>>;
/**
* Returns the type inferred by a promise's return value.
*
* @example
* async function getThing() {
* // return type is a number
* let result: number = await fetchValueSomewhere();
* return result;
* }
*
* type Thing = ThenArg<ReturnType<typeof getThing>>;
* // number
*/
export declare type ThenArg<T> = T extends PromiseLike<infer U> ? U : T;
export interface ComponentWithAs<ComponentType extends As, ComponentProps> {

@@ -52,0 +66,0 @@ <TT extends As>(props: PropsWithAs<TT, ComponentProps>): ReactElement | null;

{
"name": "@reach/utils",
"version": "0.8.6",
"version": "0.9.0",
"description": "Internal, shared utilities for Reach UI.",

@@ -13,5 +13,3 @@ "author": "React Training <hello@reacttraining.com>",

"scripts": {
"build": "yarn clean && yarn compile",
"clean": "rm -rf ./dist",
"compile": "cross-env NODE_ENV=production tsdx build --format=cjs,esm --tsconfig tsconfig.build.json"
"build": "ts-node ../../scripts/build"
},

@@ -33,3 +31,3 @@ "peerDependencies": {

},
"gitHead": "0c71a018a11055b17815f0fb127cdcd981cd760e"
"gitHead": "0c789bb48554bf13c62dd09210ebdf2f9af33d30"
}

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