@leafygreen-ui/lib
Advanced tools
Comparing version 4.4.1 to 4.5.0
# @leafygreen-ui/lib | ||
## 4.5.0 | ||
### Minor Changes | ||
- 1c797b3: Adds `OneOf` type helper | ||
## 4.4.1 | ||
@@ -4,0 +10,0 @@ |
@@ -42,2 +42,6 @@ /// <reference types="react" /> | ||
}[Keys]; | ||
/** | ||
* Helper that constructs mutually exclusive record types. Refer to tests for usage. | ||
*/ | ||
export declare type OneOf<T1, T2> = (T1 & Partial<Record<Exclude<keyof T2, keyof T1>, never>>) | (T2 & Partial<Record<Exclude<keyof T1, keyof T2>, never>>); | ||
/** Helper type to check if element is a specific React Component */ | ||
@@ -98,1 +102,2 @@ export declare function isComponentType<T = React.ReactElement>(element: React.ReactNode, displayName: string): element is T; | ||
}; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -14,1 +14,2 @@ import { Matcher, MatcherOptions } from '@testing-library/react'; | ||
export {}; | ||
//# sourceMappingURL=testHelpers.d.ts.map |
export declare function element(node?: Node | null): node is HTMLElement; | ||
export declare function button(el?: Node | null): el is HTMLButtonElement; | ||
export declare function input(el?: Node | null): el is HTMLInputElement; | ||
//# sourceMappingURL=typeIs.d.ts.map |
{ | ||
"name": "@leafygreen-ui/lib", | ||
"version": "4.4.1", | ||
"version": "4.5.0", | ||
"description": "leafyGreen UI Kit Internal Library", | ||
@@ -5,0 +5,0 @@ "browser": "./dist/index.web.js", |
@@ -53,2 +53,9 @@ import * as typeIs from './typeIs'; | ||
/** | ||
* Helper that constructs mutually exclusive record types. Refer to tests for usage. | ||
*/ | ||
export type OneOf<T1, T2> = | ||
| (T1 & Partial<Record<Exclude<keyof T2, keyof T1>, never>>) | ||
| (T2 & Partial<Record<Exclude<keyof T1, keyof T2>, never>>); | ||
/** Helper type to check if element is a specific React Component */ | ||
@@ -55,0 +62,0 @@ export function isComponentType<T = React.ReactElement>( |
@@ -5,2 +5,3 @@ { | ||
"declarationDir": "dist", | ||
"outDir": "dist", | ||
"rootDir": "src" | ||
@@ -7,0 +8,0 @@ }, |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
332296
24
436