Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

types missing? #133

Open
nicolasburtey opened this issue Apr 27, 2020 · 8 comments
Open

types missing? #133

nicolasburtey opened this issue Apr 27, 2020 · 8 comments
Labels

Comments

@nicolasburtey
Copy link

I'm losing types suggestion from Visual Studio Code if I use EStyleSheet. Do I need to install anything beyond "react-native-extended-stylesheet" to get the types as I have them with StyleSheet?

Environment

System:
OS: macOS 10.15.3
CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
Memory: 273.95 MB / 16.00 GB
Shell: 5.0.16 - /usr/local/bin/bash
Binaries:
Node: 10.16.3 - ~/.nvm/versions/node/v10.16.3/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.13.1 - ~/.nvm/versions/node/v10.16.3/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5791312
Xcode: 11.4.1/11E503a - /usr/bin/xcodebuild
npmPackages:
react: 16.13.1 => 16.13.1
react-native: 0.61.5 => 0.61.5

@vitalets
Copy link
Owner

vitalets commented May 1, 2020

Do I need to install anything beyond "react-native-extended-stylesheet" to get the types as I have them with StyleSheet?

No. Types are included in index.d.ts. Could you check with some other package having types in index.d.ts?

@nexorianus
Copy link

nexorianus commented May 5, 2020

can confirm this in Visual Studio Code.
React.StyleSheet.create():
image
EStyleSheet.create():
image

The problem is, that you define the properties of the create object as

type AnyObject = {[key: string]: any};

(this plugin v0.12.0)
i guess, this should rather expand the React.StyleSheet types:

type NamedStyles<T> = { [P in keyof T]: ViewStyle | TextStyle | ImageStyle };

(rn v0.60.31)

btw. i guess its a duplicate of #118

@stale
Copy link

stale bot commented Jul 4, 2020

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the wontfix label Jul 4, 2020
@nexorianus
Copy link

this is not solved in behalf of the opening post.

@stale
Copy link

stale bot commented Sep 5, 2020

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the wontfix label Sep 5, 2020
@nexorianus
Copy link

push

@stale stale bot removed the wontfix label Sep 8, 2020
@stale
Copy link

stale bot commented Nov 8, 2020

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the wontfix label Nov 8, 2020
@stale stale bot closed this as completed Nov 15, 2020
@vitalets vitalets added pinned and removed wontfix labels Mar 5, 2021
@vitalets vitalets reopened this Mar 5, 2021
@erzzo
Copy link

erzzo commented Dec 13, 2021

I'm experiencing the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants