From 2b957274d0c4276c652edbf59476d078e8aca916 Mon Sep 17 00:00:00 2001 From: Braden MacDonald Date: Wed, 22 May 2024 06:00:15 -0700 Subject: [PATCH] feat: Add TypeScript types for (#3077) --- src/Hyperlink/index.tsx | 2 +- src/setupTest.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Hyperlink/index.tsx b/src/Hyperlink/index.tsx index c1af4bbccc..5229f73f8f 100644 --- a/src/Hyperlink/index.tsx +++ b/src/Hyperlink/index.tsx @@ -121,7 +121,7 @@ Hyperlink.propTypes = { * loaded into the same browsing context as the current one. * If the target is `_blank` (opening a new window) `rel='noopener'` will be added to the anchor tag to prevent * any potential [reverse tabnabbing attack](https://www.owasp.org/index.php/Reverse_Tabnabbing). - */ + */ target: PropTypes.oneOf(['_blank', '_self']), /** specifies the callback function when the link is clicked */ onClick: PropTypes.func, diff --git a/src/setupTest.ts b/src/setupTest.ts index 18d3dc2e34..acd5ba24da 100644 --- a/src/setupTest.ts +++ b/src/setupTest.ts @@ -18,3 +18,7 @@ class ResizeObserver { } window.ResizeObserver = ResizeObserver; + +(window as any).crypto = { + getRandomValues: (arr: any) => crypto.randomBytes(arr.length), +};