@lincode/events 1.0.31 → 1.0.33

Sign up to get free protection for your applications and to get access to all the features.
package/lib/Events.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Cancellable } from "@lincode/promiselikes";
2
- export default class<Payload = void, Names extends string = string> {
2
+ export default class Events<Payload = void, Names extends string = string> {
3
3
  private cbsMap;
4
4
  private states?;
5
5
  on(name: Names | Array<Names>, cb: (val: Payload) => void): Cancellable;
package/lib/Events.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Cancellable } from "@lincode/promiselikes";
2
2
  import { forceGet } from "@lincode/utils";
3
- export default class {
3
+ export default class Events {
4
4
  constructor() {
5
5
  this.cbsMap = new Map();
6
6
  }
package/lib/index.js CHANGED
@@ -1,6 +1,5 @@
1
1
  export { default, default as Events } from "./Events";
2
2
  export { default as event, Event } from "./event";
3
- console.log("@lincode/events");
4
3
  const w = window;
5
4
  "__LINCODE_EVENTS__" in w &&
6
5
  console.warn("multiple versions of @lincode/events detected");
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const promiselikes_1 = require("@lincode/promiselikes");
4
4
  const utils_1 = require("@lincode/utils");
5
- class default_1 {
5
+ class Events {
6
6
  constructor() {
7
7
  this.cbsMap = new Map();
8
8
  }
@@ -59,4 +59,4 @@ class default_1 {
59
59
  (_a = this.states) === null || _a === void 0 ? void 0 : _a.clear();
60
60
  }
61
61
  }
62
- exports.default = default_1;
62
+ exports.default = Events;
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "Events", { enumerable: true, get: function () {
7
7
  var event_1 = require("./event");
8
8
  Object.defineProperty(exports, "event", { enumerable: true, get: function () { return event_1.default; } });
9
9
  Object.defineProperty(exports, "Event", { enumerable: true, get: function () { return event_1.Event; } });
10
- console.log("@lincode/events");
11
10
  const w = window;
12
11
  "__LINCODE_EVENTS__" in w &&
13
12
  console.warn("multiple versions of @lincode/events detected");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lincode/events",
3
- "version": "1.0.31",
3
+ "version": "1.0.33",
4
4
  "description": "Generated by ambients-cli",
5
5
  "author": "Lai Schwe",
6
6
  "license": "MIT",
@@ -8,11 +8,11 @@
8
8
  "ambients"
9
9
  ],
10
10
  "dependencies": {
11
- "@lincode/promiselikes": "^1.0.24",
12
- "@lincode/utils": "^1.3.5"
11
+ "@lincode/promiselikes": "^1.0.25",
12
+ "@lincode/utils": "^1.3.19"
13
13
  },
14
14
  "devDependencies": {
15
- "typescript": "^4.9.4"
15
+ "typescript": "^5.0.4"
16
16
  },
17
17
  "scripts": {
18
18
  "build": "ambients clean && yarn tsc && yarn tsc -p tsconfig-commonjs.json",
package/src/Events.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Cancellable } from "@lincode/promiselikes"
2
2
  import { forceGet } from "@lincode/utils"
3
3
 
4
- export default class<Payload = void, Names extends string = string> {
4
+ export default class Events<Payload = void, Names extends string = string> {
5
5
  private cbsMap = new Map<string, Set<(val: Payload) => void>>()
6
6
  private states?: Map<string, Payload>
7
7
 
package/src/index.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  export { default, default as Events } from "./Events"
2
2
  export { default as event, EventFunctions, Event } from "./event"
3
3
 
4
- console.log("@lincode/events")
5
4
  const w = window as any
6
5
  "__LINCODE_EVENTS__" in w &&
7
6
  console.warn("multiple versions of @lincode/events detected")