[v3] Typescript needs to switch typings over to RN automatically
See original GitHub issueVersion
styled-components: 3.0.1 babel-plugin-styled-components: —
Reproduction
https://www.webpackbin.com/bins/-KeeZCr0xKfutOfOujxN https://codesandbox.io/s/rkmNRByE4
Steps to reproduce
After adopting new import for native i.e. omitting /native
all types are missing for things like styled.Text
, styled.ImageBackground
etc…
Expected Behavior
These should exist in native on styled
with new import.
Actual Behavior
import styled from "styled-components";
const Test = Styled.Text``;
[ts] Property 'Text' does not exist on type 'ThemedBaseStyledInterface<any>'. Did you mean 'text'?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:19 (13 by maintainers)
Top Results From Across the Web
Could not find a declaration file for module 'module-name ...
It only worked for me if I named the typings file index.d. · Also worked for me (didn't need to change the name...
Read more >Documentation - Type Compatibility - TypeScript
Type compatibility in TypeScript is based on structural subtyping. Structural typing is a way of relating types based solely on their members.
Read more >Configure TypeScript, TSLint, and Prettier in VS Code for ...
For this post we are going to start from a newly created project. You can skip ahead to the TypeScript setup if you're...
Read more >If you don't use TypeScript, tell me why : r/javascript - Reddit
Given that TypeScript makes every attempt to align syntactically with the underlying language (almost verbatim), provides optional static typing ...
Read more >How To Set Up a React Project with Create React App
In other words, you don't have to worry about configuring a build ... change to the CSS and the JavaScript code that will...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You can still use
styled-components/native
in 3.x as a temporary fix for TypeScript.@mxstbr is it possible to not deprecate
styled-components/native
until it’s sorted out?