Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@leafygreen-ui/lib

Package Overview
Dependencies
Maintainers
3
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leafygreen-ui/lib - npm Package Compare versions

Comparing version 4.1.0 to 4.2.0

6

CHANGELOG.md
# @leafygreen-ui/lib
## 4.2.0
### Minor Changes
- fabc1c9: `isComponentType` function now types return-element more specifically, rather than just as `React.ReactElement`
## 4.1.0

@@ -4,0 +10,0 @@

2

dist/index.d.ts

@@ -24,3 +24,3 @@ /// <reference types="react" />

/** Helper type to check if element is a specific React Component */
export declare function isComponentType(element: React.ReactNode, displayName: string): element is React.ReactElement;
export declare function isComponentType<T = React.ReactElement>(element: React.ReactNode, displayName: string): element is T;
/** Object mapping keyCodes to keys */

@@ -27,0 +27,0 @@ export declare const keyMap: {

{
"name": "@leafygreen-ui/lib",
"version": "4.1.0",
"version": "4.2.0",
"description": "leafyGreen UI Kit Internal Library",

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

@@ -39,6 +39,6 @@ import * as typeIs from './typeIs';

/** Helper type to check if element is a specific React Component */
export function isComponentType(
export function isComponentType<T = React.ReactElement>(
element: React.ReactNode,
displayName: string,
): element is React.ReactElement {
): element is T {
return (

@@ -45,0 +45,0 @@ element != null &&

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