New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using Electron's new official TypeScript Definitions #12888
Comments
I think that's because you're looking at the |
Hi, that's great to see the official TypeScript support for Electron! Alhtough this should not be discussed here, but I have some concerns about removing current definition file immediately. I want to know that the new type definition actually can replace
I want to see the generated type definition to know that it has enough quality to replace type definition in DefinitelyTyped. |
@rhysd I'm currently in the process of moving city so my computer is currently in a box 馃槩 When I unpack though I'll test the generated definition against those files and ensure it works 馃憤 FWIW I have already tested the definition against a few typescript projects I have and against VS Code and all of them required minimal changes to work with the new definitions (10 - 40 changes) mostly due to type names changing. I.e. In the current definition we have If you want to take a look at the definition before I get setup again (or before @zeke sees this) you can just clone https://github.com/electron/electron-definitelytyped and run |
@rhysd So I borrowed someones laptop and took a look. With the latest docs and the latest generator I get 3 errors on the The Will probably need to discuss how best to handle the WebView API stuff somewhere (slack maybe). I have a sneaky idea that we can just inherit from EDIT: Link to generated file --> https://gist.github.com/MarshallOfSound/8b1b1aa0773fab1a9178cc2d1025dadd |
@MarshallOfSound Thank you for detailed explanation. It sounds nice 馃憤 I'll also try it in my apps. |
@rhysd @niik Want to try get the ball rolling on this again. The linked gist has been updated with the latest generated typings: https://gist.github.com/MarshallOfSound/8b1b1aa0773fab1a9178cc2d1025dadd And now passes all of the tests currently in this repository. Looking for the best way forward RE moving towards a typings file that we publish rather than the manually maintained one here. We are almost at the point where we can ship an
|
I would like to review the auto-generated file thoroughly. Last time I've checked (two weeks ago), there were still some issues. |
@miniak that would be great. Please report anything you find at https://github.com/electron/electron-typescript-definitions/issues, and note that there are already a few issues filed there. |
Yep, submit a PR to https://github.com/DefinitelyTyped/DefinitelyTyped. But you shouldn't need to do that. See below.
TypeScript will prefer the typing we include in Electron over any typings provided by The trick will be communicating to users that they no longer need |
It was suggested (by @felixrieseberg, I believe) that people should still have a way to install the official Electron definitions without having to include all of |
We're just about to ship an official WIP blog post: electron/electronjs.org-old#731 As I mentioned earlier, we can continue publishing the new auto-generated types here as |
@miniak if you can help update the typings here, that would be awesome! You also mentioned updating the typings registry. Is that still something you can take care of? |
The types publisher has a mechanism for this. For example, if I
I don't know the extent to which you'll need to worry about the registry. If it's in the package itself you should be fine. |
Can this issue be closed yet? |
electron/electron.d.ts
馃憢
I work on the Electron team at GitHub. We are in the process of generating an
electron.d.ts
file as part of our release process, and will soon be bundling it in theelectron
(andelectron-prebuilt
) npm package. electron-userland/electron-prebuilt#209I am attempting to remove the existing Electron definitions from this repository to prevent issues/collisions for existing users of the third-party definition file. I'm following the steps outlined at https://github.com/DefinitelyTyped/DefinitelyTyped#removing-a-package, but I do not see a
notNeededPackages.json
file as mentioned in those instructions. Am I missing something?cc @MarshallOfSound @niik
The text was updated successfully, but these errors were encountered: