res-pareto-build 0.0.0 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  import * as glo from "./glossary";
2
2
  export type CbuildArray = glo.FBuildArray;
3
- export type CbuildDictionary = glo.FBuildDictionary;
3
+ export type CunsafeBuildDictionary = glo.FUnsafeBuildDictionary;
4
4
  export type API = {
5
5
  buildArray: CbuildArray;
6
- buildDictionary: CbuildDictionary;
6
+ unsafeBuildDictionary: CunsafeBuildDictionary;
7
7
  };
@@ -3,4 +3,4 @@ import * as mcommon from "glo-pareto-common";
3
3
  export type IAdd<GPType> = ($: T.KeyValuePair<GPType>) => void;
4
4
  export type IPush<GPType> = ($: T.Type<GPType>) => void;
5
5
  export type FBuildArray = <GPType>($: mcommon.T.Null, $c: ($i: IPush<GPType>) => void) => T.Array<GPType>;
6
- export type FBuildDictionary = <GPType>($: mcommon.T.Null, $c: ($i: IAdd<GPType>) => void) => T.Dictionary<GPType>;
6
+ export type FUnsafeBuildDictionary = <GPType>($: mcommon.T.Null, $c: ($i: IAdd<GPType>) => void) => T.Dictionary<GPType>;
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.$a = void 0;
4
4
  const buildArray_native_1 = require("./implementations/buildArray.native");
5
- const buildDictionary_native_1 = require("./implementations/buildDictionary.native");
5
+ const unsafeBuildDictionary_native_1 = require("./implementations/unsafeBuildDictionary.native");
6
6
  exports.$a = {
7
7
  'buildArray': buildArray_native_1.$$,
8
- 'buildDictionary': buildDictionary_native_1.$$,
8
+ 'unsafeBuildDictionary': unsafeBuildDictionary_native_1.$$,
9
9
  };
@@ -0,0 +1,2 @@
1
+ import { CunsafeBuildDictionary } from "../api";
2
+ export declare const $$: CunsafeBuildDictionary;
@@ -28,6 +28,9 @@ const pi = __importStar(require("pareto-core-internals"));
28
28
  const $$ = ($, $c) => {
29
29
  const out = {};
30
30
  $c(($) => {
31
+ if (out[$.key] !== undefined) {
32
+ pi.panic(`entry '${$.key}' already exists`);
33
+ }
31
34
  out[$.key] = $.value;
32
35
  });
33
36
  return pi.wrapRawDictionary(out);
package/package.json CHANGED
@@ -16,6 +16,6 @@
16
16
  "main": "dist/index.js",
17
17
  "types": "dist/index.d.ts",
18
18
  "name": "res-pareto-build",
19
- "version": "0.0.0",
20
- "content-fingerprint": "77db4d751e0b86550410aac098fe2022eaa8b62a"
19
+ "version": "0.1.0",
20
+ "content-fingerprint": "ee21324e1764983c3861dff1102ede68d6146e77"
21
21
  }
@@ -1,2 +0,0 @@
1
- import { CbuildDictionary } from "../api";
2
- export declare const $$: CbuildDictionary;