Skip to content

TypeScript errors with Electron 1.6.9 type definitions #39

Closed

Description

@poiru

I get the following errors just from the electron.d.ts file:

788     webContents: webContents;
                     ~~~~~~~~~~~
node_modules/electron/electron.d.ts(788,18): error TS2304: Cannot find name 'webContents'.


2646     workingSetSize?: number;
         ~~~~~~~~~~~~~~
node_modules/electron/electron.d.ts(2646,5): error TS2300: Duplicate identifier 'workingSetSize'.


2650     workingSetSize?: number;
         ~~~~~~~~~~~~~~
node_modules/electron/electron.d.ts(2650,5): error TS2300: Duplicate identifier 'workingSetSize'.


5662     false?: by;
         ~~~~~
node_modules/electron/electron.d.ts(5662,5): error TS2300: Duplicate identifier 'false'.


5662     false?: by;
                 ~~
node_modules/electron/electron.d.ts(5662,13): error TS2304: Cannot find name 'by'.


5666     false?: by;
         ~~~~~
node_modules/electron/electron.d.ts(5666,5): error TS2300: Duplicate identifier 'false'.


5666     false?: by;
                 ~~
node_modules/electron/electron.d.ts(5666,13): error TS2304: Cannot find name 'by'.


7696     getCPUUsage(CPUUsage: CPUUsage): void;
                               ~~~~~~~~
node_modules/electron/electron.d.ts(7696,27): error TS2304: Cannot find name 'CPUUsage'.


7697     getIOCounters(IOCounters: IOCounters): void;
                                   ~~~~~~~~~~
node_modules/electron/electron.d.ts(7697,31): error TS2304: Cannot find name 'IOCounters'.

Activity

  1. zeke commented on May 10, 2017

    @zeke
    Contributor
  2. zeke commented on May 11, 2017

    @zeke
    Contributor

    @poiru now that electron/electron#9429 has landed can you run the following and let me know how it goes?

    cd electron/electron
    git checkout master
    git pull
    npm run create-typescript-definitions
    cp out/electron.d.ts ~/your-electron-project/node_modules/electron
  3. poiru commented on May 11, 2017

    @poiru
    ContributorAuthor

    @zeke That seems to fixed the errors in electron.d.ts. I'll file another issue for the remaining stuff. Thank you!

  4. valorad commented on May 14, 2017

    @valorad

    Cool! Recreating electron typescript definitions from source worked in angular-cli as well, both AOT and JIT compilation.

  5. zeke commented on May 15, 2017

    @zeke
    Contributor

    Electron's typescript definitions are actually derived from markdown docs, not source code. All the API docs have gradually been updated to adhere to the styleguide.

  6. valorad commented on May 15, 2017

    @valorad

    Thanks @zeke ! It's good to know. In fact I intended to refer to electron/electron source, not exactly this repo here :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions