res-pareto-build 0.9.0 → 0.11.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 +15 -19
  2. package/dist/glossary/algorithmtypes.generated.d.ts +32 -27
  3. package/dist/glossary/datatypes.generated.d.ts +21 -13
  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/{createAsyncOverwritingDictionaryBuilder.native.js → createArrayBuilder.native.js} +14 -11
  12. package/dist/implementations/createSafeDictionaryBuilder.native.d.ts +2 -0
  13. package/dist/implementations/{unsafeSyncBuildDictionary.native.js → createSafeDictionaryBuilder.native.js} +34 -7
  14. package/dist/implementations/createUnsafeDictionaryBuilder.native.d.ts +2 -0
  15. package/dist/implementations/{createAsyncArrayBuilder.native.js → createUnsafeDictionaryBuilder.native.js} +17 -7
  16. package/package.json +4 -4
  17. package/dist/implementations/createAsyncArrayBuilder.native.d.ts +0 -2
  18. package/dist/implementations/createAsyncIgnoringDictionaryBuilder.native.d.ts +0 -2
  19. package/dist/implementations/createAsyncIgnoringDictionaryBuilder.native.js +0 -45
  20. package/dist/implementations/createAsyncOverwritingDictionaryBuilder.native.d.ts +0 -2
  21. package/dist/implementations/createSyncIgnoringDictionaryBuilder.native.d.ts +0 -2
  22. package/dist/implementations/createSyncOverwritingDictionaryBuilder.native.d.ts +0 -2
  23. package/dist/implementations/createUnsafeAsyncDictionaryBuilder.native.d.ts +0 -2
  24. package/dist/implementations/createUnsafeAsyncDictionaryBuilder.native.js +0 -42
  25. package/dist/implementations/unsafeSyncBuildDictionary.native.d.ts +0 -2
@@ -1,26 +1,22 @@
1
1
  import * as g_common from "glo-pareto-common";
2
2
  import * as g_this from "./glossary";
3
+ export declare namespace D {
4
+ }
3
5
  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: {
9
- readonly 'onDuplicate': g_common.SYNC.I.String;
10
- }) => g_this.SYNC.A.F.BuildDictionary;
11
- type createSyncOverwritingDictionaryBuilder = ($d: {}, $se: {
6
+ type buildArray = () => g_this.SYNC.A.F.BuildArray;
7
+ type buildSafeDictionary = ($: g_this.T.DictionaryBuildStrategy, $se: {
12
8
  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;
9
+ }) => g_this.SYNC.A.F.BuildSafeDictionary;
10
+ type buildUnsafeDictionary = () => g_this.SYNC.A.F.BuildUnsafeDictionary;
11
+ type createArrayBuilder = () => g_this.ASYNC.A.C.CreateArrayBuilder;
12
+ type createSafeDictionaryBuilder = ($: g_this.T.DictionaryBuildStrategy) => g_this.ASYNC.A.C.CreateSafeDictionaryBuilder;
13
+ type createUnsafeDictionaryBuilder = () => g_this.ASYNC.A.C.CreateUnsafeDictionaryBuilder;
16
14
  }
17
15
  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;
16
+ readonly 'buildArray': A.buildArray;
17
+ readonly 'buildSafeDictionary': A.buildSafeDictionary;
18
+ readonly 'buildUnsafeDictionary': A.buildUnsafeDictionary;
19
+ readonly 'createArrayBuilder': A.createArrayBuilder;
20
+ readonly 'createSafeDictionaryBuilder': A.createSafeDictionaryBuilder;
21
+ readonly 'createUnsafeDictionaryBuilder': A.createUnsafeDictionaryBuilder;
26
22
  };
@@ -2,55 +2,60 @@ 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<TEndType, TType> = ($: T.Array<TEndType, TType>) => void;
6
+ type Dictionary<TEndType, TType> = ($: T.Dictionary<TEndType, 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;
13
- 'end': () => void;
11
+ type Elements<TEndType, TType> = {
12
+ 'data': ($: TType) => void;
13
+ 'end': ($: TEndType) => void;
14
14
  };
15
- type Entries<GType> = {
16
- 'data': ($: T.KeyValuePair<GType>) => void;
17
- 'end': () => void;
15
+ type Entries<TEndType, TType> = {
16
+ 'data': ($: T.KeyValuePair<TType>) => void;
17
+ 'end': ($: TEndType) => 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 = {
23
+ 'construct': <TEndType, TType>($is: {
24
+ readonly 'handler': ASYNC.I.Array<TEndType, TType>;
25
+ }) => ASYNC.I.Elements<TEndType, TType>;
26
+ };
25
27
  }
26
28
  namespace C {
27
- type CreateSafeDictionaryBuilder = <GType>($is: {
28
- 'duplicatesHandler': ASYNC.I.DuplicatesHandler<GType>;
29
- 'handler': ASYNC.I.Dictionary<GType>;
30
- }) => ASYNC.I.Entries<GType>;
29
+ type CreateSafeDictionaryBuilder = {
30
+ 'construct': <TEndType, TType>($is: {
31
+ readonly 'duplicatesHandler': ASYNC.I.DuplicatesHandler;
32
+ readonly 'handler': ASYNC.I.Dictionary<TEndType, TType>;
33
+ }) => ASYNC.I.Entries<TEndType, TType>;
34
+ };
31
35
  }
32
36
  namespace C {
33
- type CreateUnsafeDictionaryBuilder = <GType>($is: {
34
- 'handler': ASYNC.I.Dictionary<GType>;
35
- }) => ASYNC.I.Entries<GType>;
37
+ type CreateUnsafeDictionaryBuilder = {
38
+ 'construct': <TEndType, TType>($is: {
39
+ readonly 'handler': ASYNC.I.Dictionary<TEndType, TType>;
40
+ }) => ASYNC.I.Entries<TEndType, TType>;
41
+ };
36
42
  }
37
43
  }
38
44
  }
39
45
  export declare namespace SYNC {
40
46
  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;
47
+ type Add<TType> = ($: T.KeyValuePair<TType>) => void;
48
+ type Push<TType> = ($: TType) => void;
47
49
  }
48
50
  namespace A {
49
51
  namespace F {
50
- type BuildArray = <GType>($c: ($b: SYNC.I.Push<GType>) => void) => T.Array<GType>;
52
+ type BuildArray = <TType>($c: ($i: SYNC.I.Push<TType>) => void) => g_common.T.Array<TType>;
53
+ }
54
+ namespace F {
55
+ type BuildSafeDictionary = <TType>($c: ($i: SYNC.I.Add<TType>) => void) => g_common.T.Dictionary<TType>;
51
56
  }
52
57
  namespace F {
53
- type BuildDictionary = <GType>($c: ($b: SYNC.I.Add<GType>) => void) => T.Dictionary<GType>;
58
+ type BuildUnsafeDictionary = <TType>($c: ($i: SYNC.I.Add<TType>) => void) => g_common.T.Dictionary<TType>;
54
59
  }
55
60
  }
56
61
  }
@@ -1,27 +1,35 @@
1
- import * as pt from 'pareto-core-types';
1
+ import * as g_common from "glo-pareto-common";
2
+ export declare namespace N { }
2
3
  export declare namespace T {
3
4
  namespace Array {
4
- type A<GType> = GType;
5
+ type array<TEndType, TType> = g_common.T.Array<TType>;
6
+ type end<TEndType, TType> = TEndType;
5
7
  }
6
- type Array<GType> = pt.Array<GType>;
8
+ type Array<TEndType, TType> = {
9
+ readonly 'array': g_common.T.Array<TType>;
10
+ readonly 'end': TEndType;
11
+ };
7
12
  namespace Dictionary {
8
- type D<GType> = GType;
13
+ type dictionary<TEndType, TType> = g_common.T.Dictionary<TType>;
14
+ type end<TEndType, TType> = TEndType;
9
15
  }
10
- type Dictionary<GType> = pt.Dictionary<GType>;
16
+ type Dictionary<TEndType, TType> = {
17
+ readonly 'dictionary': g_common.T.Dictionary<TType>;
18
+ readonly 'end': TEndType;
19
+ };
11
20
  namespace DictionaryBuildStrategy {
12
21
  namespace ignore { }
13
- type ignore<GType> = null;
22
+ type ignore = null;
14
23
  namespace overwrite { }
15
- type overwrite<GType> = null;
24
+ type overwrite = null;
16
25
  }
17
- type DictionaryBuildStrategy<GType> = ['ignore', null] | ['overwrite', null];
26
+ type DictionaryBuildStrategy = ['ignore', null] | ['overwrite', null];
18
27
  namespace KeyValuePair {
19
- type key<GType> = string;
20
- type value<GType> = GType;
28
+ type key<TType> = string;
29
+ type value<TType> = TType;
21
30
  }
22
- type KeyValuePair<GType> = {
31
+ type KeyValuePair<TType> = {
23
32
  readonly 'key': string;
24
- readonly 'value': GType;
33
+ readonly 'value': TType;
25
34
  };
26
- type Type<GType> = GType;
27
35
  }
@@ -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,18 +25,21 @@ 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 = {};
28
+ const $$ = () => {
30
29
  return {
31
- 'data': ($) => {
32
- if (dict[$.key] !== undefined) {
33
- $is.duplicatesHandler.data($.key);
34
- }
35
- dict[$.key] = $.value;
36
- },
37
- 'end': () => {
38
- $is.handler(pi.wrapRawDictionary(dict));
39
- $is.duplicatesHandler.end();
30
+ 'construct': ($is) => {
31
+ const arr = [];
32
+ return {
33
+ 'data': ($) => {
34
+ arr.push($);
35
+ },
36
+ 'end': ($) => {
37
+ $is.handler({
38
+ 'end': $,
39
+ 'array': pi.wrapRawArray(arr)
40
+ });
41
+ }
42
+ };
40
43
  }
41
44
  };
42
45
  };
@@ -0,0 +1,2 @@
1
+ import { A } from "../api.generated";
2
+ export declare const $$: A.createSafeDictionaryBuilder;
@@ -26,13 +26,40 @@ Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.$$ = void 0;
27
27
  const pi = __importStar(require("pareto-core-internals"));
28
28
  const $$ = ($c) => {
29
- const out = {};
30
- $c(($) => {
31
- if (out[$.key] !== undefined) {
32
- pi.panic(`entry '${$.key}' already exists`);
29
+ return {
30
+ 'construct': ($is) => {
31
+ const dict = {};
32
+ return {
33
+ 'data': ($) => {
34
+ if (dict[$.key] !== undefined) {
35
+ const x = $;
36
+ switch ($c[0]) {
37
+ case 'ignore':
38
+ pi.cc($c[1], ($) => {
39
+ });
40
+ break;
41
+ case 'overwrite':
42
+ pi.cc($c[1], ($) => {
43
+ dict[x.key] = x.value;
44
+ });
45
+ break;
46
+ default: pi.au($c[0]);
47
+ }
48
+ $is.duplicatesHandler.data($.key);
49
+ }
50
+ else {
51
+ dict[$.key] = $.value;
52
+ }
53
+ },
54
+ 'end': ($) => {
55
+ $is.handler({
56
+ 'dictionary': pi.wrapRawDictionary(dict),
57
+ 'end': $,
58
+ });
59
+ $is.duplicatesHandler.end();
60
+ }
61
+ };
33
62
  }
34
- out[$.key] = $.value;
35
- });
36
- return pi.wrapRawDictionary(out);
63
+ };
37
64
  };
38
65
  exports.$$ = $$;
@@ -0,0 +1,2 @@
1
+ import { A } from "../api.generated";
2
+ export declare const $$: A.createUnsafeDictionaryBuilder;
@@ -25,14 +25,24 @@ 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 = [];
28
+ const $$ = () => {
30
29
  return {
31
- 'data': ($) => {
32
- arr.push($);
33
- },
34
- 'end': () => {
35
- $is.handler(pi.wrapRawArray(arr));
30
+ 'construct': ($is) => {
31
+ const dict = {};
32
+ return {
33
+ 'data': ($) => {
34
+ if (dict[$.key] !== undefined) {
35
+ pi.panic(`duplicate key: ${$.key}`);
36
+ }
37
+ dict[$.key] = $.value;
38
+ },
39
+ 'end': ($) => {
40
+ $is.handler({
41
+ 'dictionary': pi.wrapRawDictionary(dict),
42
+ 'end': $
43
+ });
44
+ }
45
+ };
36
46
  }
37
47
  };
38
48
  };
package/package.json CHANGED
@@ -3,8 +3,8 @@
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",
7
- "pareto-core-internals": "^0.13.2"
6
+ "glo-pareto-common": "^0.28.0",
7
+ "pareto-core-internals": "^0.13.4"
8
8
  },
9
9
  "files": [
10
10
  "dist"
@@ -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.11.0",
20
+ "content-fingerprint": "12ff37e1a36c0f336eedf4891c3d4e189f76cca7"
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,45 +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
- $is.duplicatesHandler.data($.key);
34
- }
35
- else {
36
- dict[$.key] = $.value;
37
- }
38
- },
39
- 'end': () => {
40
- $is.handler(pi.wrapRawDictionary(dict));
41
- $is.duplicatesHandler.end();
42
- }
43
- };
44
- };
45
- exports.$$ = $$;
@@ -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;