Skip to content

IntelliSense for StyleSheet not working #29180

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

Closed
josemigallas opened this issue Dec 21, 2018 · 7 comments
Closed

IntelliSense for StyleSheet not working #29180

josemigallas opened this issue Dec 21, 2018 · 7 comments
Labels
Duplicate An existing issue was already created

Comments

@josemigallas
Copy link

Intellisense won't work inside StyleSheet.create({}) after adding a second style:

intellisense-stylesheet-bug

  • VSCode Version: 1.24.1 && 1.30.0-insider
  • OS Version: macOS 10.14.1

Steps to Reproduce:

  1. Create a StyleSheet using StyleSheet#create with a class.
  2. Adding the first style, intellisense will work.
  3. Adding a second style, intellisense will only work if adding it above the first one but not beneath.
  4. Adding more styles, intellisense will not work anymore.

Does this issue occur when all extensions are disabled?: Yes

Migrated from: microsoft/vscode-react-native#306

@CreeperKong

This comment has been minimized.

@HaloWang

This comment has been minimized.

@mjbvz mjbvz transferred this issue from microsoft/vscode Dec 28, 2018
@mjbvz
Copy link
Contributor

mjbvz commented Dec 28, 2018

Tested with [email protected]

Example code:

import { StyleSheet } from 'react-native';

StyleSheet.create({
    class: {
        padding: 1,
        mar
    }
})

padding is a suggestion; margin is not

@mjbvz mjbvz removed their assignment Dec 28, 2018
@kerrexwong

This comment has been minimized.

@weswigham
Copy link
Member

Duplicate of #28470 and probably more issues. Root cause is the object satisfies the constraint and becomes the contextual type at that position, which then informs completions (when really you still want completions to be informed from the uninstantiated type parameter).

@weswigham weswigham added the Duplicate An existing issue was already created label Jan 2, 2019
@typescript-bot
Copy link
Collaborator

This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes.

@HaloWang
Copy link

#306

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

7 participants