@types/component-emitter 1.2.10 → 1.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
component-emitter/LICENSE CHANGED
File without changes
@@ -6,9 +6,38 @@ This package contains type definitions for component-emitter (https://www.npmjs.
6
6
 
7
7
  # Details
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/component-emitter.
9
+ ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/component-emitter/index.d.ts)
10
+ ````ts
11
+ // Type definitions for component-emitter v1.2.1
12
+ // Project: https://www.npmjs.com/package/component-emitter
13
+ // Definitions by: Peter Snider <https://github.com/psnider>
14
+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
15
+
16
+ // TypeScript Version: 2.2
17
+
18
+ interface Emitter<Event = string> {
19
+ on(event: Event, listener: Function): Emitter;
20
+ once(event: Event, listener: Function): Emitter;
21
+ off(event?: Event, listener?: Function): Emitter;
22
+ emit(event: Event, ...args: any[]): Emitter;
23
+ listeners(event: Event): Function[];
24
+ hasListeners(event: Event): boolean;
25
+ removeListener(event?: Event, listener?: Function): Emitter;
26
+ removeEventListener(event?: Event, listener?: Function): Emitter;
27
+ removeAllListeners(event?: Event): Emitter;
28
+ }
29
+
30
+ declare const Emitter: {
31
+ (obj?: object): Emitter;
32
+ new (obj?: object): Emitter;
33
+ };
34
+
35
+ export = Emitter;
36
+
37
+ ````
9
38
 
10
39
  ### Additional Details
11
- * Last updated: Wed, 09 Sep 2020 21:18:32 GMT
40
+ * Last updated: Thu, 14 Oct 2021 19:01:31 GMT
12
41
  * Dependencies: none
13
42
  * Global values: none
14
43
 
@@ -12,6 +12,9 @@ interface Emitter<Event = string> {
12
12
  emit(event: Event, ...args: any[]): Emitter;
13
13
  listeners(event: Event): Function[];
14
14
  hasListeners(event: Event): boolean;
15
+ removeListener(event?: Event, listener?: Function): Emitter;
16
+ removeEventListener(event?: Event, listener?: Function): Emitter;
17
+ removeAllListeners(event?: Event): Emitter;
15
18
  }
16
19
 
17
20
  declare const Emitter: {
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@types/component-emitter",
3
- "version": "1.2.10",
3
+ "version": "1.2.11",
4
4
  "description": "TypeScript definitions for component-emitter",
5
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/component-emitter",
5
6
  "license": "MIT",
6
7
  "contributors": [
7
8
  {
@@ -19,6 +20,6 @@
19
20
  },
20
21
  "scripts": {},
21
22
  "dependencies": {},
22
- "typesPublisherContentHash": "446bfc6b04cc0bdf3afbaa65ac393c5c9056ab15d158199b96d266059c762403",
23
- "typeScriptVersion": "3.1"
23
+ "typesPublisherContentHash": "d86d217b63101effae1228ebbfe02ac682ee4eb8abd6fc0dcc9948a4b6fdf572",
24
+ "typeScriptVersion": "3.7"
24
25
  }