res-pareto-build 0.9.0 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (25) hide show
  1. package/dist/api.generated.d.ts +13 -19
  2. package/dist/glossary/algorithmtypes.generated.d.ts +24 -25
  3. package/dist/glossary/datatypes.generated.d.ts +11 -12
  4. package/dist/implementation.generated.js +10 -14
  5. package/dist/implementations/buildArray.native.js +8 -6
  6. package/dist/implementations/buildSafeDictionary.native.d.ts +2 -0
  7. package/dist/implementations/{createSyncOverwritingDictionaryBuilder.native.js → buildSafeDictionary.native.js} +14 -2
  8. package/dist/implementations/buildUnsafeDictionary.native.d.ts +2 -0
  9. package/dist/implementations/{createSyncIgnoringDictionaryBuilder.native.js → buildUnsafeDictionary.native.js} +4 -6
  10. package/dist/implementations/createArrayBuilder.native.d.ts +2 -0
  11. package/dist/implementations/{createAsyncArrayBuilder.native.js → createArrayBuilder.native.js} +11 -9
  12. package/dist/implementations/createSafeDictionaryBuilder.native.d.ts +2 -0
  13. package/dist/implementations/{createAsyncOverwritingDictionaryBuilder.native.js → createSafeDictionaryBuilder.native.js} +29 -12
  14. package/dist/implementations/createUnsafeDictionaryBuilder.native.d.ts +2 -0
  15. package/dist/implementations/{createAsyncIgnoringDictionaryBuilder.native.js → createUnsafeDictionaryBuilder.native.js} +12 -13
  16. package/package.json +3 -3
  17. package/dist/implementations/createAsyncArrayBuilder.native.d.ts +0 -2
  18. package/dist/implementations/createAsyncIgnoringDictionaryBuilder.native.d.ts +0 -2
  19. package/dist/implementations/createAsyncOverwritingDictionaryBuilder.native.d.ts +0 -2
  20. package/dist/implementations/createSyncIgnoringDictionaryBuilder.native.d.ts +0 -2
  21. package/dist/implementations/createSyncOverwritingDictionaryBuilder.native.d.ts +0 -2
  22. package/dist/implementations/createUnsafeAsyncDictionaryBuilder.native.d.ts +0 -2
  23. package/dist/implementations/createUnsafeAsyncDictionaryBuilder.native.js +0 -42
  24. package/dist/implementations/unsafeSyncBuildDictionary.native.d.ts +0 -2
  25. package/dist/implementations/unsafeSyncBuildDictionary.native.js +0 -38
@@ -1,26 +1,20 @@
1
1
  import * as g_common from "glo-pareto-common";
2
2
  import * as g_this from "./glossary";
3
3
  export declare namespace A {
4
- type buildArray = g_this.SYNC.A.F.BuildArray;
5
- type createAsyncArrayBuilder = g_this.ASYNC.A.C.CreateArrayBuilder;
6
- type createAsyncIgnoringDictionaryBuilder = g_this.ASYNC.A.C.CreateSafeDictionaryBuilder;
7
- type createAsyncOverwritingDictionaryBuilder = g_this.ASYNC.A.C.CreateSafeDictionaryBuilder;
8
- type createSyncIgnoringDictionaryBuilder = ($d: {}, $se: {
4
+ type buildArray = () => g_this.SYNC.A.F.BuildArray;
5
+ type buildSafeDictionary = ($: g_this.T.DictionaryBuildStrategy, $se: {
9
6
  readonly 'onDuplicate': g_common.SYNC.I.String;
10
- }) => g_this.SYNC.A.F.BuildDictionary;
11
- type createSyncOverwritingDictionaryBuilder = ($d: {}, $se: {
12
- readonly 'onDuplicate': g_common.SYNC.I.String;
13
- }) => g_this.SYNC.A.F.BuildDictionary;
14
- type createUnsafeAsyncDictionaryBuilder = g_this.ASYNC.A.C.CreateUnsafeDictionaryBuilder;
15
- type unsafeSyncBuildDictionary = g_this.SYNC.A.F.BuildDictionary;
7
+ }) => g_this.SYNC.A.F.BuildSafeDictionary;
8
+ type buildUnsafeDictionary = () => g_this.SYNC.A.F.BuildUnsafeDictionary;
9
+ type createArrayBuilder = () => g_this.ASYNC.A.C.CreateArrayBuilder;
10
+ type createSafeDictionaryBuilder = ($: g_this.T.DictionaryBuildStrategy) => g_this.ASYNC.A.C.CreateSafeDictionaryBuilder;
11
+ type createUnsafeDictionaryBuilder = () => g_this.ASYNC.A.C.CreateUnsafeDictionaryBuilder;
16
12
  }
17
13
  export type API = {
18
- buildArray: A.buildArray;
19
- createAsyncArrayBuilder: A.createAsyncArrayBuilder;
20
- createAsyncIgnoringDictionaryBuilder: A.createAsyncIgnoringDictionaryBuilder;
21
- createAsyncOverwritingDictionaryBuilder: A.createAsyncOverwritingDictionaryBuilder;
22
- createSyncIgnoringDictionaryBuilder: A.createSyncIgnoringDictionaryBuilder;
23
- createSyncOverwritingDictionaryBuilder: A.createSyncOverwritingDictionaryBuilder;
24
- createUnsafeAsyncDictionaryBuilder: A.createUnsafeAsyncDictionaryBuilder;
25
- unsafeSyncBuildDictionary: A.unsafeSyncBuildDictionary;
14
+ readonly 'buildArray': A.buildArray;
15
+ readonly 'buildSafeDictionary': A.buildSafeDictionary;
16
+ readonly 'buildUnsafeDictionary': A.buildUnsafeDictionary;
17
+ readonly 'createArrayBuilder': A.createArrayBuilder;
18
+ readonly 'createSafeDictionaryBuilder': A.createSafeDictionaryBuilder;
19
+ readonly 'createUnsafeDictionaryBuilder': A.createUnsafeDictionaryBuilder;
26
20
  };
@@ -2,55 +2,54 @@ import { T } from "./datatypes.generated";
2
2
  import * as g_common from "glo-pareto-common";
3
3
  export declare namespace ASYNC {
4
4
  namespace I {
5
- type Array<GType> = ($: T.Array<GType>) => void;
6
- type Dictionary<GType> = ($: T.Dictionary<GType>) => void;
7
- type DuplicatesHandler<GType> = {
5
+ type Array<TType> = ($: T.Array<TType>) => void;
6
+ type Dictionary<TType> = ($: T.Dictionary<TType>) => void;
7
+ type DuplicatesHandler = {
8
8
  'data': ($: g_common.T.String) => void;
9
9
  'end': () => void;
10
10
  };
11
- type Elements<GType> = {
12
- 'data': ($: T.Type<GType>) => void;
11
+ type Elements<TType> = {
12
+ 'data': ($: TType) => void;
13
13
  'end': () => void;
14
14
  };
15
- type Entries<GType> = {
16
- 'data': ($: T.KeyValuePair<GType>) => void;
15
+ type Entries<TType> = {
16
+ 'data': ($: T.KeyValuePair<TType>) => void;
17
17
  'end': () => void;
18
18
  };
19
19
  }
20
20
  namespace A {
21
21
  namespace C {
22
- type CreateArrayBuilder = <GType>($is: {
23
- 'handler': ASYNC.I.Array<GType>;
24
- }) => ASYNC.I.Elements<GType>;
22
+ type CreateArrayBuilder = <TType>($is: {
23
+ readonly 'handler': ASYNC.I.Array<TType>;
24
+ }) => ASYNC.I.Elements<TType>;
25
25
  }
26
26
  namespace C {
27
- type CreateSafeDictionaryBuilder = <GType>($is: {
28
- 'duplicatesHandler': ASYNC.I.DuplicatesHandler<GType>;
29
- 'handler': ASYNC.I.Dictionary<GType>;
30
- }) => ASYNC.I.Entries<GType>;
27
+ type CreateSafeDictionaryBuilder = <TType>($is: {
28
+ readonly 'duplicatesHandler': ASYNC.I.DuplicatesHandler;
29
+ readonly 'handler': ASYNC.I.Dictionary<TType>;
30
+ }) => ASYNC.I.Entries<TType>;
31
31
  }
32
32
  namespace C {
33
- type CreateUnsafeDictionaryBuilder = <GType>($is: {
34
- 'handler': ASYNC.I.Dictionary<GType>;
35
- }) => ASYNC.I.Entries<GType>;
33
+ type CreateUnsafeDictionaryBuilder = <TType>($is: {
34
+ readonly 'handler': ASYNC.I.Dictionary<TType>;
35
+ }) => ASYNC.I.Entries<TType>;
36
36
  }
37
37
  }
38
38
  }
39
39
  export declare namespace SYNC {
40
40
  namespace I {
41
- type Add<GType> = ($: T.KeyValuePair<GType>) => void;
42
- type Push<GType> = ($: T.Type<GType>) => void;
43
- }
44
- namespace IW {
45
- type Add<GType> = ($c: ($b: I.Add<GType>) => void) => void;
46
- type Push<GType> = ($c: ($b: I.Push<GType>) => void) => void;
41
+ type Add<TType> = ($: T.KeyValuePair<TType>) => void;
42
+ type Push<TType> = ($: TType) => void;
47
43
  }
48
44
  namespace A {
49
45
  namespace F {
50
- type BuildArray = <GType>($c: ($b: SYNC.I.Push<GType>) => void) => T.Array<GType>;
46
+ type BuildArray = <TType>($c: ($i: SYNC.I.Push<TType>) => void) => T.Array<TType>;
47
+ }
48
+ namespace F {
49
+ type BuildSafeDictionary = <TType>($c: ($i: SYNC.I.Add<TType>) => void) => T.Dictionary<TType>;
51
50
  }
52
51
  namespace F {
53
- type BuildDictionary = <GType>($c: ($b: SYNC.I.Add<GType>) => void) => T.Dictionary<GType>;
52
+ type BuildUnsafeDictionary = <TType>($c: ($i: SYNC.I.Add<TType>) => void) => T.Dictionary<TType>;
54
53
  }
55
54
  }
56
55
  }
@@ -1,27 +1,26 @@
1
1
  import * as pt from 'pareto-core-types';
2
2
  export declare namespace T {
3
3
  namespace Array {
4
- type A<GType> = GType;
4
+ type A<TType> = TType;
5
5
  }
6
- type Array<GType> = pt.Array<GType>;
6
+ type Array<TType> = pt.Array<TType>;
7
7
  namespace Dictionary {
8
- type D<GType> = GType;
8
+ type D<TType> = TType;
9
9
  }
10
- type Dictionary<GType> = pt.Dictionary<GType>;
10
+ type Dictionary<TType> = pt.Dictionary<TType>;
11
11
  namespace DictionaryBuildStrategy {
12
12
  namespace ignore { }
13
- type ignore<GType> = null;
13
+ type ignore = null;
14
14
  namespace overwrite { }
15
- type overwrite<GType> = null;
15
+ type overwrite = null;
16
16
  }
17
- type DictionaryBuildStrategy<GType> = ['ignore', null] | ['overwrite', null];
17
+ type DictionaryBuildStrategy = ['ignore', null] | ['overwrite', null];
18
18
  namespace KeyValuePair {
19
- type key<GType> = string;
20
- type value<GType> = GType;
19
+ type key<TType> = string;
20
+ type value<TType> = TType;
21
21
  }
22
- type KeyValuePair<GType> = {
22
+ type KeyValuePair<TType> = {
23
23
  readonly 'key': string;
24
- readonly 'value': GType;
24
+ readonly 'value': TType;
25
25
  };
26
- type Type<GType> = GType;
27
26
  }
@@ -2,20 +2,16 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.$r = void 0;
4
4
  const buildArray_native_1 = require("./implementations/buildArray.native");
5
- const createAsyncArrayBuilder_native_1 = require("./implementations/createAsyncArrayBuilder.native");
6
- const createAsyncIgnoringDictionaryBuilder_native_1 = require("./implementations/createAsyncIgnoringDictionaryBuilder.native");
7
- const createAsyncOverwritingDictionaryBuilder_native_1 = require("./implementations/createAsyncOverwritingDictionaryBuilder.native");
8
- const createSyncIgnoringDictionaryBuilder_native_1 = require("./implementations/createSyncIgnoringDictionaryBuilder.native");
9
- const createSyncOverwritingDictionaryBuilder_native_1 = require("./implementations/createSyncOverwritingDictionaryBuilder.native");
10
- const createUnsafeAsyncDictionaryBuilder_native_1 = require("./implementations/createUnsafeAsyncDictionaryBuilder.native");
11
- const unsafeSyncBuildDictionary_native_1 = require("./implementations/unsafeSyncBuildDictionary.native");
5
+ const buildSafeDictionary_native_1 = require("./implementations/buildSafeDictionary.native");
6
+ const buildUnsafeDictionary_native_1 = require("./implementations/buildUnsafeDictionary.native");
7
+ const createArrayBuilder_native_1 = require("./implementations/createArrayBuilder.native");
8
+ const createSafeDictionaryBuilder_native_1 = require("./implementations/createSafeDictionaryBuilder.native");
9
+ const createUnsafeDictionaryBuilder_native_1 = require("./implementations/createUnsafeDictionaryBuilder.native");
12
10
  exports.$r = {
13
11
  'buildArray': buildArray_native_1.$$,
14
- 'createAsyncArrayBuilder': createAsyncArrayBuilder_native_1.$$,
15
- 'createAsyncIgnoringDictionaryBuilder': createAsyncIgnoringDictionaryBuilder_native_1.$$,
16
- 'createAsyncOverwritingDictionaryBuilder': createAsyncOverwritingDictionaryBuilder_native_1.$$,
17
- 'createSyncIgnoringDictionaryBuilder': createSyncIgnoringDictionaryBuilder_native_1.$$,
18
- 'createSyncOverwritingDictionaryBuilder': createSyncOverwritingDictionaryBuilder_native_1.$$,
19
- 'createUnsafeAsyncDictionaryBuilder': createUnsafeAsyncDictionaryBuilder_native_1.$$,
20
- 'unsafeSyncBuildDictionary': unsafeSyncBuildDictionary_native_1.$$,
12
+ 'buildSafeDictionary': buildSafeDictionary_native_1.$$,
13
+ 'buildUnsafeDictionary': buildUnsafeDictionary_native_1.$$,
14
+ 'createArrayBuilder': createArrayBuilder_native_1.$$,
15
+ 'createSafeDictionaryBuilder': createSafeDictionaryBuilder_native_1.$$,
16
+ 'createUnsafeDictionaryBuilder': createUnsafeDictionaryBuilder_native_1.$$,
21
17
  };
@@ -25,11 +25,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.$$ = void 0;
27
27
  const pi = __importStar(require("pareto-core-internals"));
28
- const $$ = ($c) => {
29
- const out = [];
30
- $c(($) => {
31
- out.push($);
32
- });
33
- return pi.wrapRawArray(out);
28
+ const $$ = () => {
29
+ return ($c) => {
30
+ const out = [];
31
+ $c(($) => {
32
+ out.push($);
33
+ });
34
+ return pi.wrapRawArray(out);
35
+ };
34
36
  };
35
37
  exports.$$ = $$;
@@ -0,0 +1,2 @@
1
+ import { A } from "../api.generated";
2
+ export declare const $$: A.buildSafeDictionary;
@@ -25,7 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.$$ = void 0;
27
27
  const pi = __importStar(require("pareto-core-internals"));
28
- const $$ = ($d, $se) => {
28
+ const $$ = ($x, $se) => {
29
29
  return ($c) => {
30
30
  const out = {};
31
31
  $c(($) => {
@@ -33,7 +33,19 @@ const $$ = ($d, $se) => {
33
33
  out[$.key] = $.value;
34
34
  }
35
35
  else {
36
- out[$.key] = $.value;
36
+ const x = $;
37
+ switch ($x[0]) {
38
+ case 'ignore':
39
+ pi.cc($x[1], ($) => {
40
+ });
41
+ break;
42
+ case 'overwrite':
43
+ pi.cc($x[1], ($) => {
44
+ out[x.key] = x.value;
45
+ });
46
+ break;
47
+ default: pi.au($x[0]);
48
+ }
37
49
  $se.onDuplicate($.key);
38
50
  }
39
51
  });
@@ -0,0 +1,2 @@
1
+ import { A } from "../api.generated";
2
+ export declare const $$: A.buildUnsafeDictionary;
@@ -25,16 +25,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.$$ = void 0;
27
27
  const pi = __importStar(require("pareto-core-internals"));
28
- const $$ = ($d, $se) => {
28
+ const $$ = () => {
29
29
  return ($c) => {
30
30
  const out = {};
31
31
  $c(($) => {
32
- if (out[$.key] === undefined) {
33
- out[$.key] = $.value;
34
- }
35
- else {
36
- $se.onDuplicate($.key);
32
+ if (out[$.key] !== undefined) {
33
+ pi.panic(`entry '${$.key}' already exists`);
37
34
  }
35
+ out[$.key] = $.value;
38
36
  });
39
37
  return pi.wrapRawDictionary(out);
40
38
  };
@@ -0,0 +1,2 @@
1
+ import { A } from "../api.generated";
2
+ export declare const $$: A.createArrayBuilder;
@@ -25,15 +25,17 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.$$ = void 0;
27
27
  const pi = __importStar(require("pareto-core-internals"));
28
- const $$ = ($is) => {
29
- const arr = [];
30
- return {
31
- 'data': ($) => {
32
- arr.push($);
33
- },
34
- 'end': () => {
35
- $is.handler(pi.wrapRawArray(arr));
36
- }
28
+ const $$ = () => {
29
+ return ($is) => {
30
+ const arr = [];
31
+ return {
32
+ 'data': ($) => {
33
+ arr.push($);
34
+ },
35
+ 'end': () => {
36
+ $is.handler(pi.wrapRawArray(arr));
37
+ }
38
+ };
37
39
  };
38
40
  };
39
41
  exports.$$ = $$;
@@ -0,0 +1,2 @@
1
+ import { A } from "../api.generated";
2
+ export declare const $$: A.createSafeDictionaryBuilder;
@@ -25,19 +25,36 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.$$ = void 0;
27
27
  const pi = __importStar(require("pareto-core-internals"));
28
- const $$ = ($is) => {
29
- const dict = {};
30
- return {
31
- 'data': ($) => {
32
- if (dict[$.key] !== undefined) {
33
- $is.duplicatesHandler.data($.key);
28
+ const $$ = ($c) => {
29
+ return ($is) => {
30
+ const dict = {};
31
+ return {
32
+ 'data': ($) => {
33
+ if (dict[$.key] !== undefined) {
34
+ const x = $;
35
+ switch ($c[0]) {
36
+ case 'ignore':
37
+ pi.cc($c[1], ($) => {
38
+ });
39
+ break;
40
+ case 'overwrite':
41
+ pi.cc($c[1], ($) => {
42
+ dict[x.key] = x.value;
43
+ });
44
+ break;
45
+ default: pi.au($c[0]);
46
+ }
47
+ $is.duplicatesHandler.data($.key);
48
+ }
49
+ else {
50
+ dict[$.key] = $.value;
51
+ }
52
+ },
53
+ 'end': () => {
54
+ $is.handler(pi.wrapRawDictionary(dict));
55
+ $is.duplicatesHandler.end();
34
56
  }
35
- dict[$.key] = $.value;
36
- },
37
- 'end': () => {
38
- $is.handler(pi.wrapRawDictionary(dict));
39
- $is.duplicatesHandler.end();
40
- }
57
+ };
41
58
  };
42
59
  };
43
60
  exports.$$ = $$;
@@ -0,0 +1,2 @@
1
+ import { A } from "../api.generated";
2
+ export declare const $$: A.createUnsafeDictionaryBuilder;
@@ -25,21 +25,20 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.$$ = void 0;
27
27
  const pi = __importStar(require("pareto-core-internals"));
28
- const $$ = ($is) => {
29
- const dict = {};
30
- return {
31
- 'data': ($) => {
32
- if (dict[$.key] !== undefined) {
33
- $is.duplicatesHandler.data($.key);
34
- }
35
- else {
28
+ const $$ = () => {
29
+ return ($is) => {
30
+ const dict = {};
31
+ return {
32
+ 'data': ($) => {
33
+ if (dict[$.key] !== undefined) {
34
+ pi.panic(`duplicate key: ${$.key}`);
35
+ }
36
36
  dict[$.key] = $.value;
37
+ },
38
+ 'end': () => {
39
+ $is.handler(pi.wrapRawDictionary(dict));
37
40
  }
38
- },
39
- 'end': () => {
40
- $is.handler(pi.wrapRawDictionary(dict));
41
- $is.duplicatesHandler.end();
42
- }
41
+ };
43
42
  };
44
43
  };
45
44
  exports.$$ = $$;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "license": "TBD",
4
4
  "description": "this library provides functions to build arrays and dictionaries by adding entries/elements one by one",
5
5
  "dependencies": {
6
- "glo-pareto-common": "^0.23.0",
6
+ "glo-pareto-common": "^0.26.0",
7
7
  "pareto-core-internals": "^0.13.2"
8
8
  },
9
9
  "files": [
@@ -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.9.0",
20
- "content-fingerprint": "cbd5ea1268bca538a30032e1e752e895c73223f4"
19
+ "version": "0.10.0",
20
+ "content-fingerprint": "ce2f706ad4e8e2d0c02b7aefd7404d8093e9edbc"
21
21
  }
@@ -1,2 +0,0 @@
1
- import { A } from "../api.generated";
2
- export declare const $$: A.createAsyncArrayBuilder;
@@ -1,2 +0,0 @@
1
- import { A } from "../api.generated";
2
- export declare const $$: A.createAsyncIgnoringDictionaryBuilder;
@@ -1,2 +0,0 @@
1
- import { A } from "../api.generated";
2
- export declare const $$: A.createAsyncOverwritingDictionaryBuilder;
@@ -1,2 +0,0 @@
1
- import { A } from "../api.generated";
2
- export declare const $$: A.createSyncIgnoringDictionaryBuilder;
@@ -1,2 +0,0 @@
1
- import { A } from "../api.generated";
2
- export declare const $$: A.createSyncOverwritingDictionaryBuilder;
@@ -1,2 +0,0 @@
1
- import { A } from "../api.generated";
2
- export declare const $$: A.createUnsafeAsyncDictionaryBuilder;
@@ -1,42 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.$$ = void 0;
27
- const pi = __importStar(require("pareto-core-internals"));
28
- const $$ = ($is) => {
29
- const dict = {};
30
- return {
31
- 'data': ($) => {
32
- if (dict[$.key] !== undefined) {
33
- pi.panic(`duplicate key: ${$.key}`);
34
- }
35
- dict[$.key] = $.value;
36
- },
37
- 'end': () => {
38
- $is.handler(pi.wrapRawDictionary(dict));
39
- }
40
- };
41
- };
42
- exports.$$ = $$;
@@ -1,2 +0,0 @@
1
- import { A } from "../api.generated";
2
- export declare const $$: A.unsafeSyncBuildDictionary;
@@ -1,38 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.$$ = void 0;
27
- const pi = __importStar(require("pareto-core-internals"));
28
- const $$ = ($c) => {
29
- const out = {};
30
- $c(($) => {
31
- if (out[$.key] !== undefined) {
32
- pi.panic(`entry '${$.key}' already exists`);
33
- }
34
- out[$.key] = $.value;
35
- });
36
- return pi.wrapRawDictionary(out);
37
- };
38
- exports.$$ = $$;