Khan / Khan/aphrodite

About the type definition issue on StyleDeclarationMap

Open
#388 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5.3k
Forks
187
PR merge metrics
No merged PRs in 30d

Description

**TypeScript Version:** 3.7.5
**Aphrodite Version:** 2.4.0
When I using StyleSheet create function
```javascript
const style = StyleSheet.create({
container: {
}
})
```
I found out that VS Code is not able to give me any autocomplete suggestion on those CSS properties, since they think StyleDeclarationMap is a type of 'any'

![Snipaste_2020-02-05_18-37-10](https://user-images.githubusercontent.com/6605655/73834801-4f633100-4847-11ea-8971-13c560096aa1.png)
but it is not
![Snipaste_2020-02-05_18-35-36](https://user-images.githubusercontent.com/6605655/73834836-6144d400-4847-11ea-9eca-9ec6456931e6.png)

I have changed typescript version and modified my tsconfig file, but nothing make it work.

I wonder how can I fixed this issue?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by inspecting the type definitions used by StyleSheet.create, especially StyleDeclarationMap, and reproduce the missing CSS-property autocomplete with TypeScript 3.7.5 and Aphrodite 2.4.0. Done means VS Code offers CSS property suggestions for styles created through StyleSheet.create.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.