Git Product home page Git Product logo

env-electron's People

Contributors

blakeembrey avatar burtharris avatar greenkeeper[bot] avatar miniak avatar olsondev avatar unional avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

env-electron's Issues

How to use `BrowserWindow` as a type?

My code is:

import { BrowserWindow } from 'electron'

function doSomeOnWindow(win: BrowserWindow) {
  win.loadURL('...')
}

It is wrong:

error TS2304: Cannot find name 'BrowserWindow'

So how do I correct it?

Update definitions to v0.37.6

Relevant changelog notes:

  • commit Add isMainFrame parameter to did-fail-load event of WebContents.
  • commit Add statusLine property to webRequest.OnHeadersReceived API's responseHeaders object.
  • commit Add backgroundThrottling option to webPreferences of BrowserWindow.
  • commit Add resourceType parameter to did-get-response-details event of WebContents.

How to install by typings?

I ran typings install env~electron but got not found error

typings ERR! message https://api.typings.org/entries/npm/env~electron responded with 404, expected it to equal 200

typings ERR! cwd /Users/xxxxxxx
typings ERR! system Darwin 15.6.0
typings ERR! command "/Users/xxxxxx/.nvm/versions/node/v5.0.0/bin/node" "/usr/local/bin/typings" "info" "env~electron"
typings ERR! node -v v5.0.0
typings ERR! typings -v 0.7.12
typings ERR! code EINVALIDSTATUS

Try to remove hard dependency on ambient Node.js shape

This one is tricky, but generally valuable. Currently the type definition is directly tied to the current Node.js type definition shape on DefinitelyTyped. I'd love to move away from relying on ambient shapes and instead rely on the actual exposed types. E.g. Change from relying on NodeJS.EventEmitter to import { EventEmitter } from 'events'. Basically, making dependencies explicit and mirroring what exists at runtime instead of relying on implicit and ambient interfaces.

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.