question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Does not support typescript

See original GitHub issue

Environment

Using react-native-web unfortunately so can’t get diagnostics.

Description

Component explodes app with this error:

./node_modules/@react-native-community/slider/js/Slider.js
SyntaxError: /app/node_modules/@react-native-community/slider/js/Slider.js: Unexpected token (17:12)

  15 | const RCTSliderNativeComponent = require('./RNCSliderNativeComponent');
  16 | 
> 17 | import type {NativeComponent} from 'react-native/Libraries/Renderer/shims/ReactNative';
     |             ^
  18 | import type {ImageSource} from 'react-native/Libraries/Image/ImageSource';
  19 | import type {ViewStyleProp} from 'react-native/Libraries/StyleSheet/StyleSheet';
  20 | import type {ColorValue} from 'react-native/Libraries/StyleSheet/StyleSheetTypes';

Reproducible Demo

I can add if required but it looks like the flow types are tripping up, so should be easy to test on any react-native typescript project.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7

github_iconTop GitHub Comments

12reactions
jonstuebecommented, Jul 19, 2019

Doesn’t seem like this should be closed. Still an issue, any ideas?

3reactions
jsnxcommented, Oct 28, 2019

Same problem here. Can we open it again please.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to set up TypeScript
For project types which don't support Nuget, you can use the TypeScript Visual Studio extension. You can install the extension using Extensions >...
Read more >
How to use javascript packages which don't support typescript ...
My React.js project uses Typescript and can't change it to Javascript due to just this chart library. I know many libraries don't support...
Read more >
TypeScript Programming with Visual Studio Code
No, the TypeScript language service that ships with Visual Studio 2019 and 2022 isn't compatible with VS Code. You will need to install...
Read more >
The Handsontable modules do not support TypeScript #7489
The modularized version of the Handsontable does not support TypeScript. Currently, only the Base module ( import Handsontable from ' ...
Read more >
TypeScript | IntelliJ IDEA Documentation - JetBrains
IntelliJ IDEA supports developing, running, and debugging TypeScript source code. IntelliJ IDEA recognizes .ts and .tsx files and provides ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found