exupery-core-internals 0.1.7 → 0.1.8

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.
@@ -1,7 +1,6 @@
1
1
  import * as _et from "exupery-core-types";
2
2
  /**
3
3
  * returns a Exupery array
4
- * why is this not the constructor? to call a constructor, you have to use the keyword 'new'. Exupery doesn't use the concept of a class so that keyword should be avoided
5
4
 
6
5
  * @param source An array literal
7
6
  * @returns
@@ -38,15 +38,14 @@ class Array_Class {
38
38
  }
39
39
  /**
40
40
  * returns a Exupery array
41
- * why is this not the constructor? to call a constructor, you have to use the keyword 'new'. Exupery doesn't use the concept of a class so that keyword should be avoided
42
41
 
43
42
  * @param source An array literal
44
43
  * @returns
45
44
  */
46
45
  function array_literal(source) {
47
- const data = source.slice(); //create a copy
48
- if (!(data instanceof Array)) {
46
+ if (!(source instanceof Array)) {
49
47
  throw new Error("invalid input in 'array_literal'");
50
48
  }
51
- return new Array_Class(source);
49
+ const data = source.slice(); //create a copy
50
+ return new Array_Class(data);
52
51
  }
package/dist/index.d.ts CHANGED
@@ -8,4 +8,3 @@ export * from "./imp/public/switch_state";
8
8
  export * from "./imp/public/get_location_info";
9
9
  export * from "./imp/public/set";
10
10
  export * from "./imp/public/not_set";
11
- export * from "./imp/public/Error";
package/dist/index.js CHANGED
@@ -24,4 +24,3 @@ __exportStar(require("./imp/public/switch_state"), exports);
24
24
  __exportStar(require("./imp/public/get_location_info"), exports);
25
25
  __exportStar(require("./imp/public/set"), exports);
26
26
  __exportStar(require("./imp/public/not_set"), exports);
27
- __exportStar(require("./imp/public/Error"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exupery-core-internals",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "license": "ISC",
5
5
  "description": "",
6
6
  "author": "Corno",
@@ -1,4 +0,0 @@
1
- export declare class Error<Type> {
2
- type: Type;
3
- constructor(type: Type);
4
- }
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Error = void 0;
4
- class Error {
5
- constructor(type) {
6
- this.type = type;
7
- this.type = type;
8
- }
9
- }
10
- exports.Error = Error;