Giter Club home page Giter Club logo

electron-typescript-quick-start's Introduction

Header Image

  • 💳 My nickname: Anders Håkansson
  • 🔊 Pronunciation: "Naht Ta Ha-ker"
  • 📫 How to reach me: andy?hawkins.app
  • ⚡ Fun fact: Samsung tests phone durability with a butt-shaped robot

electron-typescript-quick-start's People

Contributors

a904guy avatar

Watchers

 avatar  avatar  avatar

Forkers

serabass

electron-typescript-quick-start's Issues

Promise syntax not working

I'm battling to learn Electron & TypeScript at the same time so this might be really stupid, but I can't get promises to work from this starting project. I've tried several slightly different ways but here's the simplest:
const one = new Promise<string>((resolve, reject) => {});

Error is "Promise only refers to a type, but is being used as a value here" and it suggests I need to change my lib compiler option to es2015 or later.

I've tried adding to my tsconfig.json
"lib": [ "es2018", "dom" ]

Any suggestions?

[edit: a friend suggested setting "target":"esnext" and miraculously that worked, but why would that be needed? I don't want to have to use "esnext" - it's not like Promise is new!]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.