From 99a1dae312aa85d74bd294e79e99a30b36e296a6 Mon Sep 17 00:00:00 2001 From: Eli Zibin Date: Wed, 8 May 2024 08:10:08 -0700 Subject: [PATCH] explicit types --- shim.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/shim.d.ts b/shim.d.ts index d23ed2b..d124500 100644 --- a/shim.d.ts +++ b/shim.d.ts @@ -1,4 +1,5 @@ import "react-native"; +import { type ImageStyle, type TextStyle, type ViewStyle } from "react-native"; module "react-native" { export * from "react-native"; @@ -11,13 +12,12 @@ module "react-native" { | AddDark | AddDark; }; - /** * Create a stylesheet with dark-mode support via $dark property on style objects. */ - export function create | NamedStylesWithDark>( - styles: T & NamedStylesWithDark, - ): T; + export function create< + T extends NamedStylesWithDark | NamedStylesWithDark, + >(styles: T & NamedStylesWithDark): T; } }