From bcff751cac48635fb6833a71cec79bb8fc8b0d19 Mon Sep 17 00:00:00 2001
From: ankit-tailor <tailorankit3345@gmail.com>
Date: Wed, 24 Jan 2024 11:11:20 +0530
Subject: [PATCH 1/2] fix: typescript memory leak

---
 packages/styled/react/src/createStyle.ts | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/packages/styled/react/src/createStyle.ts b/packages/styled/react/src/createStyle.ts
index 8db8b45b3b..55e80fb3d4 100644
--- a/packages/styled/react/src/createStyle.ts
+++ b/packages/styled/react/src/createStyle.ts
@@ -1,9 +1,5 @@
 import type { ViewProps, ImageProps, TextProps } from 'react-native';
-import type {
-  IComponentStyleConfig,
-  ITheme,
-  UnionToIntersection,
-} from './types';
+import type { IComponentStyleConfig, ITheme } from './types';
 
 export const createStyle = <T, Variants>(
   theme: T | ITheme<Variants, ViewProps | ImageProps | TextProps>,
@@ -17,9 +13,15 @@ export const createStyle = <T, Variants>(
   };
 
   return createdStyles as {
-    theme: UnionToIntersection<
-      T | ITheme<Variants, ViewProps | ImageProps | TextProps>
-    >;
+    theme: {
+      variants: keyof Variants extends never
+        ? {}
+        : {
+            [key in keyof Variants]: {
+              [k in keyof Variants[key]]: any;
+            };
+          };
+    };
     componentConfig?: Omit<IComponentStyleConfig, 'componentName'>;
   };
 };

From 6076a8ef0da645d88d214c4741ea477af80d0362 Mon Sep 17 00:00:00 2001
From: ankit-tailor <tailorankit3345@gmail.com>
Date: Wed, 24 Jan 2024 11:21:19 +0530
Subject: [PATCH 2/2] v1.0.42

---
 packages/config/CHANGELOG.md       | 8 ++++++++
 packages/config/package.json       | 4 ++--
 packages/styled/react/CHANGELOG.md | 6 ++++++
 packages/styled/react/package.json | 2 +-
 4 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/packages/config/CHANGELOG.md b/packages/config/CHANGELOG.md
index 9b9b262f58..8730411ef0 100644
--- a/packages/config/CHANGELOG.md
+++ b/packages/config/CHANGELOG.md
@@ -1,5 +1,13 @@
 # @gluestack-ui/config
 
+## 1.1.1
+
+### Patch Changes
+
+- - Fixed typescript memory overflow issue [PR](https://github.com/gluestack/gluestack-ui/pull/1693)
+- Updated dependencies
+  - @gluestack-style/react@1.0.43
+
 ## 2.0.0
 
 ### Patch Changes
diff --git a/packages/config/package.json b/packages/config/package.json
index 86de4d7c72..b4f5e88330 100644
--- a/packages/config/package.json
+++ b/packages/config/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@gluestack-ui/config",
-  "version": "1.1.0",
+  "version": "1.1.1",
   "main": "build/gluestack-ui.config.js",
   "types": "build/gluestack-ui.config.d.ts",
   "module": "build/gluestack-ui.config",
@@ -29,7 +29,7 @@
   "author": "",
   "license": "ISC",
   "devDependencies": {
-    "@gluestack-style/react": "^1.0.22",
+    "@gluestack-style/react": "^1.0.43",
     "@gluestack-ui/themed": "^1.1.0"
   },
   "peerDependencies": {
diff --git a/packages/styled/react/CHANGELOG.md b/packages/styled/react/CHANGELOG.md
index 763ade8adf..6605f38812 100644
--- a/packages/styled/react/CHANGELOG.md
+++ b/packages/styled/react/CHANGELOG.md
@@ -1,5 +1,11 @@
 # @gluestack-style/react
 
+## 1.0.43
+
+### Patch Changes
+
+- - Fixed typescript memory overflow issue [PR](https://github.com/gluestack/gluestack-ui/pull/1693)
+
 ## 1.0.42
 
 ### Patch Changes
diff --git a/packages/styled/react/package.json b/packages/styled/react/package.json
index d15198fdb5..2f65519944 100644
--- a/packages/styled/react/package.json
+++ b/packages/styled/react/package.json
@@ -1,7 +1,7 @@
 {
   "name": "@gluestack-style/react",
   "description": "A universal & performant styling library for React Native, Next.js & React",
-  "version": "1.0.42",
+  "version": "1.0.43",
   "keywords": [
     "React Native",
     "Next.js",