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.

TS 3.8 is used, but does not work.

See original GitHub issue

Bug

The latest version of this template uses Typescript 3.8.3. TS 3.8 has a few new features: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html

For instance the “Top-Level await” feature does not work using this template. The template should either not use TS 3.8 or make sure all features work.

image image

Environment info

react-native info output:

System:
    OS: macOS 10.15.4
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 103.57 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.14.1 - ~/.nvm/versions/node/v12.14.1/bin/node
    Yarn: 1.22.0 - ~/.nvm/versions/node/v12.14.1/bin/yarn
    npm: 6.13.4 - ~/.nvm/versions/node/v12.14.1/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.9.0 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
    Android SDK:
      API Levels: 28, 29
      Build Tools: 28.0.3, 29.0.2
      System Images: android-27 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 3.6 AI-192.7142.36.36.6308749
    Xcode: 11.4/11E146 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_242 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.11.0 => 16.11.0 
    react-native: 0.62.1 => 0.62.1 
  npmGlobalPackages:
    *react-native*: Not Found

Steps To Reproduce

  1. npx react-native init MyApp --template react-native-template-typescript
  2. Copy top level await example from https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html to App.tsx …

Describe what you expected to happen:

  1. TS 3.8 features to work

Reproducible sample code

not needed i think since the repo steps are so simple.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
radko93commented, Apr 7, 2020

@Guuz this is unfortunately not possible to do fix for us as it’s related to the metro bundler https://github.com/facebook/metro/issues/522

0reactions
Guuzcommented, Apr 8, 2020

I’ll leave that decision up to you! 😃 you can close this issue if you want. It has served its purpose i think.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation - TypeScript 3.8
import type only imports declarations to be used for type annotations and declarations. It always gets fully erased, so there's no remnant of...
Read more >
Do I need to use the "import type" feature of TypeScript 3.8 if ...
Short answer: Being more explicit by using import type and export type statements seem to yield explicable benefits by safeguarding against ...
Read more >
Announcing TypeScript 3.8 - Microsoft Developer Blogs
Both Babel and TypeScript's transpileModule API will emit code that doesn't work correctly if MyThing is only a type, and TypeScript's ...
Read more >
Leveraging Type-Only imports and exports with TypeScript 3.8
Well, as the TS release notes explain, by importing an element using “import type”, it tells the compiler that the element is only...
Read more >
Google Python Style Guide
This style guide is a list of dos and don'ts for Python programs. ... pylint is a tool for finding bugs and style...
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