Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error TS2304: Cannot find name 'EventListenerOrEventListenerObject' #21922

Closed
kube opened this issue Feb 13, 2018 · 2 comments
Closed

error TS2304: Cannot find name 'EventListenerOrEventListenerObject' #21922

kube opened this issue Feb 13, 2018 · 2 comments
Assignees
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Fixed A PR has been merged for this issue

Comments

@kube
Copy link

kube commented Feb 13, 2018

TypeScript Version: 2.8.0-dev.20180213

Search Terms:

  • Electron
  • Missing EventListenerOrEventListenerObject

Problem

EventListenerOrEventListenerObject is not defined anymore in lib.d.ts, (it seems it has been renamed simply as EventListener).

This causes electron.d.ts to throw two errors during compilation:

ERROR in /Users/kube/Code/PandaNote/node_modules/electron/electron.d.ts
(6005,46): error TS2304: Cannot find name 'EventListenerOrEventListenerObject'.

ERROR in /Users/kube/Code/PandaNote/node_modules/electron/electron.d.ts
(6007,49): error TS2304: Cannot find name 'EventListenerOrEventListenerObject'.
@kube
Copy link
Author

kube commented Feb 13, 2018

Just to be sure, just ran a grep -R EventListenerOrEventListenerObject *:

TypeScript 2.7 (2500+ entries)

node_modules/typescript/lib/lib.es2018.full.d.ts:    addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
node_modules/typescript/lib/lib.es2018.full.d.ts:    removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
node_modules/typescript/lib/lib.es2018.full.d.ts:    addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
node_modules/typescript/lib/lib.es2018.full.d.ts:    removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
// ...
node_modules/typescript/lib/lib.es2016.full.d.ts:declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
node_modules/typescript/lib/lib.es2016.full.d.ts:declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
node_modules/electron/electron.d.ts:    addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
node_modules/electron/electron.d.ts:    removeEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;

TypeScript 2.8 (0 entries)

node_modules/electron/electron.d.ts:    addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
node_modules/electron/electron.d.ts:    removeEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;

@mhegazy
Copy link
Contributor

mhegazy commented Feb 13, 2018

the type was removed in microsoft/TypeScript-DOM-lib-generator#352. I did not notice that it was used in DT already. so i think we can put the type back.

@mhegazy mhegazy self-assigned this Feb 15, 2018
@mhegazy mhegazy added Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript labels Feb 15, 2018
mhegazy added a commit to microsoft/TypeScript-DOM-lib-generator that referenced this issue Feb 15, 2018
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Feb 16, 2018
@mhegazy mhegazy added this to the TypeScript 2.8 milestone Feb 16, 2018
@microsoft microsoft locked and limited conversation to collaborators Jul 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

2 participants