@duplojs/utils 1.1.9 → 1.1.10
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.
- package/dist/array/reduce.cjs +1 -0
- package/dist/array/reduce.mjs +1 -0
- package/dist/array/reduceRight.cjs +1 -0
- package/dist/array/reduceRight.mjs +1 -0
- package/dist/common/builder.cjs +70 -0
- package/dist/common/builder.d.ts +34 -0
- package/dist/common/builder.mjs +66 -0
- package/dist/common/index.d.ts +1 -0
- package/dist/common/instanceOf.cjs +1 -0
- package/dist/common/instanceOf.mjs +1 -0
- package/dist/common/kind.d.ts +3 -2
- package/dist/dataParser/base.cjs +1 -0
- package/dist/dataParser/base.d.ts +2 -2
- package/dist/dataParser/base.mjs +1 -0
- package/dist/dataParser/baseExtended.cjs +1 -0
- package/dist/dataParser/baseExtended.d.ts +1 -1
- package/dist/dataParser/baseExtended.mjs +1 -0
- package/dist/dataParser/error.d.ts +3 -3
- package/dist/dataParser/extended/array.cjs +1 -0
- package/dist/dataParser/extended/array.mjs +1 -0
- package/dist/dataParser/extended/bigint.cjs +1 -0
- package/dist/dataParser/extended/bigint.mjs +1 -0
- package/dist/dataParser/extended/boolean.cjs +1 -0
- package/dist/dataParser/extended/boolean.mjs +1 -0
- package/dist/dataParser/extended/coerce/bigint.cjs +1 -0
- package/dist/dataParser/extended/coerce/bigint.mjs +1 -0
- package/dist/dataParser/extended/coerce/boolean.cjs +1 -0
- package/dist/dataParser/extended/coerce/boolean.mjs +1 -0
- package/dist/dataParser/extended/coerce/empty.cjs +1 -0
- package/dist/dataParser/extended/coerce/empty.mjs +1 -0
- package/dist/dataParser/extended/coerce/nil.cjs +1 -0
- package/dist/dataParser/extended/coerce/nil.mjs +1 -0
- package/dist/dataParser/extended/coerce/number.cjs +1 -0
- package/dist/dataParser/extended/coerce/number.mjs +1 -0
- package/dist/dataParser/extended/coerce/string.cjs +1 -0
- package/dist/dataParser/extended/coerce/string.mjs +1 -0
- package/dist/dataParser/extended/empty.cjs +1 -0
- package/dist/dataParser/extended/empty.mjs +1 -0
- package/dist/dataParser/extended/lazy.cjs +1 -0
- package/dist/dataParser/extended/lazy.mjs +1 -0
- package/dist/dataParser/extended/literal.cjs +1 -0
- package/dist/dataParser/extended/literal.mjs +1 -0
- package/dist/dataParser/extended/nil.cjs +1 -0
- package/dist/dataParser/extended/nil.mjs +1 -0
- package/dist/dataParser/extended/nullable.cjs +1 -0
- package/dist/dataParser/extended/nullable.mjs +1 -0
- package/dist/dataParser/extended/number.cjs +1 -0
- package/dist/dataParser/extended/number.mjs +1 -0
- package/dist/dataParser/extended/object.cjs +1 -0
- package/dist/dataParser/extended/object.mjs +1 -0
- package/dist/dataParser/extended/optional.cjs +1 -0
- package/dist/dataParser/extended/optional.mjs +1 -0
- package/dist/dataParser/extended/pipe.cjs +1 -0
- package/dist/dataParser/extended/pipe.mjs +1 -0
- package/dist/dataParser/extended/record.cjs +1 -0
- package/dist/dataParser/extended/record.mjs +1 -0
- package/dist/dataParser/extended/string.cjs +1 -0
- package/dist/dataParser/extended/string.mjs +1 -0
- package/dist/dataParser/extended/templateLiteral.cjs +1 -0
- package/dist/dataParser/extended/templateLiteral.mjs +1 -0
- package/dist/dataParser/extended/transform.cjs +1 -0
- package/dist/dataParser/extended/transform.mjs +1 -0
- package/dist/dataParser/extended/tuple.cjs +1 -0
- package/dist/dataParser/extended/tuple.mjs +1 -0
- package/dist/dataParser/extended/union.cjs +1 -0
- package/dist/dataParser/extended/union.mjs +1 -0
- package/dist/dataParser/extended/unknown.cjs +1 -0
- package/dist/dataParser/extended/unknown.mjs +1 -0
- package/dist/dataParser/kind.cjs +2 -1
- package/dist/dataParser/kind.d.ts +1 -1
- package/dist/dataParser/kind.mjs +2 -1
- package/dist/dataParser/parsers/array/checkers/max.d.ts +1 -1
- package/dist/dataParser/parsers/array/checkers/min.d.ts +1 -1
- package/dist/dataParser/parsers/array/index.d.ts +1 -1
- package/dist/dataParser/parsers/bigint/checkers/max.d.ts +1 -1
- package/dist/dataParser/parsers/bigint/checkers/min.d.ts +1 -1
- package/dist/dataParser/parsers/bigint/index.d.ts +1 -1
- package/dist/dataParser/parsers/boolean.d.ts +1 -1
- package/dist/dataParser/parsers/coerce/bigint.cjs +1 -0
- package/dist/dataParser/parsers/coerce/bigint.mjs +1 -0
- package/dist/dataParser/parsers/coerce/boolean.cjs +1 -0
- package/dist/dataParser/parsers/coerce/boolean.mjs +1 -0
- package/dist/dataParser/parsers/coerce/empty.cjs +1 -0
- package/dist/dataParser/parsers/coerce/empty.mjs +1 -0
- package/dist/dataParser/parsers/coerce/nil.cjs +1 -0
- package/dist/dataParser/parsers/coerce/nil.mjs +1 -0
- package/dist/dataParser/parsers/coerce/number.cjs +1 -0
- package/dist/dataParser/parsers/coerce/number.mjs +1 -0
- package/dist/dataParser/parsers/coerce/string.cjs +1 -0
- package/dist/dataParser/parsers/coerce/string.mjs +1 -0
- package/dist/dataParser/parsers/empty.d.ts +1 -1
- package/dist/dataParser/parsers/lazy.d.ts +1 -1
- package/dist/dataParser/parsers/literal.cjs +1 -0
- package/dist/dataParser/parsers/literal.d.ts +1 -1
- package/dist/dataParser/parsers/literal.mjs +1 -0
- package/dist/dataParser/parsers/nil.d.ts +1 -1
- package/dist/dataParser/parsers/nullable.d.ts +1 -1
- package/dist/dataParser/parsers/number/checkers/int.d.ts +1 -1
- package/dist/dataParser/parsers/number/checkers/max.d.ts +1 -1
- package/dist/dataParser/parsers/number/checkers/min.d.ts +1 -1
- package/dist/dataParser/parsers/number/index.d.ts +1 -1
- package/dist/dataParser/parsers/object.cjs +1 -0
- package/dist/dataParser/parsers/object.d.ts +1 -1
- package/dist/dataParser/parsers/object.mjs +1 -0
- package/dist/dataParser/parsers/optional.d.ts +1 -1
- package/dist/dataParser/parsers/pipe.d.ts +1 -1
- package/dist/dataParser/parsers/record.d.ts +1 -1
- package/dist/dataParser/parsers/string/checkers/email.d.ts +1 -1
- package/dist/dataParser/parsers/string/checkers/max.d.ts +1 -1
- package/dist/dataParser/parsers/string/checkers/min.d.ts +1 -1
- package/dist/dataParser/parsers/string/checkers/regex.d.ts +1 -1
- package/dist/dataParser/parsers/string/checkers/url.d.ts +1 -1
- package/dist/dataParser/parsers/string/index.d.ts +1 -1
- package/dist/dataParser/parsers/templateLiteral.cjs +1 -0
- package/dist/dataParser/parsers/templateLiteral.d.ts +1 -1
- package/dist/dataParser/parsers/templateLiteral.mjs +1 -0
- package/dist/dataParser/parsers/transform.d.ts +1 -1
- package/dist/dataParser/parsers/tuple.d.ts +1 -1
- package/dist/dataParser/parsers/union.d.ts +1 -1
- package/dist/dataParser/parsers/unknown.d.ts +1 -1
- package/dist/either/bool/base.d.ts +1 -1
- package/dist/either/bool/falsy.cjs +1 -0
- package/dist/either/bool/falsy.d.ts +1 -1
- package/dist/either/bool/falsy.mjs +1 -0
- package/dist/either/bool/truthy.cjs +1 -0
- package/dist/either/bool/truthy.d.ts +1 -1
- package/dist/either/bool/truthy.mjs +1 -0
- package/dist/either/future/base.d.ts +1 -1
- package/dist/either/future/create.cjs +1 -0
- package/dist/either/future/create.mjs +1 -0
- package/dist/either/future/error.cjs +1 -0
- package/dist/either/future/error.d.ts +1 -1
- package/dist/either/future/error.mjs +1 -0
- package/dist/either/future/success.cjs +1 -0
- package/dist/either/future/success.d.ts +1 -1
- package/dist/either/future/success.mjs +1 -0
- package/dist/either/kind.cjs +2 -1
- package/dist/either/kind.d.ts +2 -2
- package/dist/either/kind.mjs +2 -1
- package/dist/either/left/create.d.ts +1 -1
- package/dist/either/left/error.d.ts +1 -1
- package/dist/either/left/fail.d.ts +1 -1
- package/dist/either/left/when.cjs +1 -0
- package/dist/either/left/when.mjs +1 -0
- package/dist/either/nullable/base.d.ts +1 -1
- package/dist/either/nullable/empty.cjs +1 -0
- package/dist/either/nullable/empty.d.ts +1 -1
- package/dist/either/nullable/empty.mjs +1 -0
- package/dist/either/nullable/filled.cjs +1 -0
- package/dist/either/nullable/filled.d.ts +1 -1
- package/dist/either/nullable/filled.mjs +1 -0
- package/dist/either/nullish/base.d.ts +1 -1
- package/dist/either/nullish/empty.cjs +1 -0
- package/dist/either/nullish/empty.d.ts +1 -1
- package/dist/either/nullish/empty.mjs +1 -0
- package/dist/either/nullish/filled.cjs +1 -0
- package/dist/either/nullish/filled.d.ts +1 -1
- package/dist/either/nullish/filled.mjs +1 -0
- package/dist/either/optional/base.d.ts +1 -1
- package/dist/either/optional/empty.cjs +1 -0
- package/dist/either/optional/empty.d.ts +1 -1
- package/dist/either/optional/empty.mjs +1 -0
- package/dist/either/optional/filled.cjs +1 -0
- package/dist/either/optional/filled.d.ts +1 -1
- package/dist/either/optional/filled.mjs +1 -0
- package/dist/either/right/asyncPipe.cjs +1 -0
- package/dist/either/right/asyncPipe.mjs +1 -0
- package/dist/either/right/create.d.ts +1 -1
- package/dist/either/right/ok.d.ts +1 -1
- package/dist/either/right/pipe.cjs +1 -0
- package/dist/either/right/pipe.mjs +1 -0
- package/dist/either/right/success.d.ts +1 -1
- package/dist/either/right/when.cjs +1 -0
- package/dist/either/right/when.mjs +1 -0
- package/dist/either/whenHasInformation.cjs +1 -0
- package/dist/either/whenHasInformation.mjs +1 -0
- package/dist/generator/asyncReduce.cjs +1 -0
- package/dist/generator/asyncReduce.mjs +1 -0
- package/dist/generator/reduce.cjs +1 -0
- package/dist/generator/reduce.mjs +1 -0
- package/dist/index.cjs +4 -0
- package/dist/index.mjs +1 -0
- package/dist/object/deepDiscriminate.cjs +1 -0
- package/dist/object/deepDiscriminate.mjs +1 -0
- package/dist/object/discriminate.cjs +1 -0
- package/dist/object/discriminate.mjs +1 -0
- package/dist/object/entries.cjs +1 -0
- package/dist/object/entries.mjs +1 -0
- package/dist/object/keys.cjs +1 -0
- package/dist/object/keys.mjs +1 -0
- package/dist/pattern/exhaustive.cjs +1 -0
- package/dist/pattern/exhaustive.mjs +1 -0
- package/dist/pattern/otherwise.cjs +1 -0
- package/dist/pattern/otherwise.mjs +1 -0
- package/dist/pattern/result.cjs +1 -0
- package/dist/pattern/result.mjs +1 -0
- package/dist/string/types/forbiddenString.d.ts +0 -1
- package/package.json +1 -1
|
@@ -9,6 +9,7 @@ var whenElse = require('../../common/whenElse.cjs');
|
|
|
9
9
|
var map = require('../../array/map.cjs');
|
|
10
10
|
var join = require('../../array/join.cjs');
|
|
11
11
|
require('../../common/globalStore.cjs');
|
|
12
|
+
require('../../common/builder.cjs');
|
|
12
13
|
var base = require('../base.cjs');
|
|
13
14
|
var error = require('../error.cjs');
|
|
14
15
|
require('../../pattern/result.cjs');
|
|
@@ -39,7 +39,7 @@ export interface DataParserDefinitionTemplateLiteral extends DataParserDefinitio
|
|
|
39
39
|
readonly template: TemplateLiteralShape;
|
|
40
40
|
readonly pattern: RegExp;
|
|
41
41
|
}
|
|
42
|
-
export declare const dataParserTemplateLiteralKind: import("../../common").KindHandler<import("../../common").KindDefinition<"@
|
|
42
|
+
export declare const dataParserTemplateLiteralKind: import("../../common").KindHandler<import("../../common").KindDefinition<"@DuplojsUtilsDataParser/template-literal", unknown>>;
|
|
43
43
|
type _DataParserTemplateLiteral<GenericDefinition extends DataParserDefinitionTemplateLiteral> = (DataParser<GenericDefinition, TemplateLiteralShapeOutput<GenericDefinition["template"]>, TemplateLiteralShapeInput<GenericDefinition["template"]>> & Kind<typeof dataParserTemplateLiteralKind.definition>);
|
|
44
44
|
export interface DataParserTemplateLiteral<GenericDefinition extends DataParserDefinitionTemplateLiteral = DataParserDefinitionTemplateLiteral> extends _DataParserTemplateLiteral<GenericDefinition> {
|
|
45
45
|
}
|
|
@@ -7,6 +7,7 @@ import { whenElse } from '../../common/whenElse.mjs';
|
|
|
7
7
|
import { map } from '../../array/map.mjs';
|
|
8
8
|
import { join } from '../../array/join.mjs';
|
|
9
9
|
import '../../common/globalStore.mjs';
|
|
10
|
+
import '../../common/builder.mjs';
|
|
10
11
|
import { dataParserInit } from '../base.mjs';
|
|
11
12
|
import { SymbolDataParserErrorIssue } from '../error.mjs';
|
|
12
13
|
import '../../pattern/result.mjs';
|
|
@@ -6,7 +6,7 @@ export interface DataParserDefinitionTransform extends DataParserDefinition<neve
|
|
|
6
6
|
readonly inner: DataParsers;
|
|
7
7
|
theFunction(input: any, error: DataParserError): unknown;
|
|
8
8
|
}
|
|
9
|
-
export declare const dataParserTransformKind: import("../../common").KindHandler<import("../../common").KindDefinition<"@
|
|
9
|
+
export declare const dataParserTransformKind: import("../../common").KindHandler<import("../../common").KindDefinition<"@DuplojsUtilsDataParser/transform", unknown>>;
|
|
10
10
|
type _DataParserTransform<GenericDefinition extends DataParserDefinitionTransform> = (DataParser<GenericDefinition, Exclude<Awaited<ReturnType<GenericDefinition["theFunction"]>>, SymbolDataParserError | SymbolDataParserErrorIssue | SymbolDataParserErrorPromiseIssue>, Input<GenericDefinition["inner"]>> & Kind<typeof dataParserTransformKind.definition>);
|
|
11
11
|
export interface DataParserTransform<GenericDefinition extends DataParserDefinitionTransform = DataParserDefinitionTransform> extends _DataParserTransform<GenericDefinition> {
|
|
12
12
|
}
|
|
@@ -22,7 +22,7 @@ export interface DataParserDefinitionTuple extends DataParserDefinition<DataPars
|
|
|
22
22
|
readonly shape: TupleShape;
|
|
23
23
|
readonly rest?: DataParsers;
|
|
24
24
|
}
|
|
25
|
-
export declare const dataParserTupleKind: import("../../common").KindHandler<import("../../common").KindDefinition<"@
|
|
25
|
+
export declare const dataParserTupleKind: import("../../common").KindHandler<import("../../common").KindDefinition<"@DuplojsUtilsDataParser/tuple", unknown>>;
|
|
26
26
|
type _DataParserTuple<GenericDefinition extends DataParserDefinitionTuple> = (DataParser<GenericDefinition, DataParserTupleShapeOutput<GenericDefinition["shape"], GenericDefinition["rest"]>, DataParserTupleShapeInput<GenericDefinition["shape"], GenericDefinition["rest"]>> & Kind<typeof dataParserTupleKind.definition>);
|
|
27
27
|
export interface DataParserTuple<GenericDefinition extends DataParserDefinitionTuple = DataParserDefinitionTuple> extends _DataParserTuple<GenericDefinition> {
|
|
28
28
|
addChecker<GenericChecker extends [DataParserTupleCheckers, ...DataParserTupleCheckers[]]>(...args: GenericChecker): DataParserTuple<AddCheckersToDefinition<GenericDefinition, GenericChecker>>;
|
|
@@ -5,7 +5,7 @@ export type UnionOptions = readonly [DataParsers, ...DataParsers[]];
|
|
|
5
5
|
export interface DataParserDefinitionUnion extends DataParserDefinition<never> {
|
|
6
6
|
readonly options: UnionOptions;
|
|
7
7
|
}
|
|
8
|
-
export declare const dataParserUnionKind: import("../../common").KindHandler<import("../../common").KindDefinition<"@
|
|
8
|
+
export declare const dataParserUnionKind: import("../../common").KindHandler<import("../../common").KindDefinition<"@DuplojsUtilsDataParser/union", unknown>>;
|
|
9
9
|
type _DataParserUnion<GenericDefinition extends DataParserDefinitionUnion> = (DataParser<GenericDefinition, Output<GenericDefinition["options"][number]>, Input<GenericDefinition["options"][number]>> & Kind<typeof dataParserUnionKind.definition>);
|
|
10
10
|
export interface DataParserUnion<GenericDefinition extends DataParserDefinitionUnion = DataParserDefinitionUnion> extends _DataParserUnion<GenericDefinition> {
|
|
11
11
|
}
|
|
@@ -3,7 +3,7 @@ import { type DataParserDefinition, type DataParser } from "../base";
|
|
|
3
3
|
import { type MergeDefinition } from "../../dataParser/types";
|
|
4
4
|
export interface DataParserDefinitionUnknown extends DataParserDefinition<never> {
|
|
5
5
|
}
|
|
6
|
-
export declare const dataParserUnknownKind: import("../../common").KindHandler<import("../../common").KindDefinition<"@
|
|
6
|
+
export declare const dataParserUnknownKind: import("../../common").KindHandler<import("../../common").KindDefinition<"@DuplojsUtilsDataParser/unknown", unknown>>;
|
|
7
7
|
type _DataParserUnknown<GenericDefinition extends DataParserDefinitionUnknown> = (DataParser<GenericDefinition, unknown, unknown> & Kind<typeof dataParserUnknownKind.definition>);
|
|
8
8
|
export interface DataParserUnknown<GenericDefinition extends DataParserDefinitionUnknown = DataParserDefinitionUnknown> extends _DataParserUnknown<GenericDefinition> {
|
|
9
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const eitherBoolKind: import("../..").KindHandler<import("../..").KindDefinition<"@
|
|
1
|
+
export declare const eitherBoolKind: import("../..").KindHandler<import("../..").KindDefinition<"@DuplojsUtilsEither/bool", unknown>>;
|
|
@@ -5,7 +5,7 @@ import { bool } from "./create";
|
|
|
5
5
|
import { type EitherLeft } from "../left";
|
|
6
6
|
import { type EitherRight } from "../right";
|
|
7
7
|
export type BoolFalsyValue = 0 | "" | undefined | null | false;
|
|
8
|
-
export declare const eitherBoolFalsyKind: import("../../common").KindHandler<import("../../common").KindDefinition<"@
|
|
8
|
+
export declare const eitherBoolFalsyKind: import("../../common").KindHandler<import("../../common").KindDefinition<"@DuplojsUtilsEither/bool-falsy", unknown>>;
|
|
9
9
|
type _EitherBoolFalsy<GenericValue extends BoolFalsyValue = BoolFalsyValue> = (EitherLeft<"bool", GenericValue> & Kind<typeof eitherBoolKind.definition> & Kind<typeof eitherBoolFalsyKind.definition>);
|
|
10
10
|
export interface EitherBoolFalsy<GenericValue extends BoolFalsyValue = BoolFalsyValue> extends _EitherBoolFalsy<GenericValue> {
|
|
11
11
|
}
|
|
@@ -4,7 +4,7 @@ import { eitherBoolKind } from "./base";
|
|
|
4
4
|
import { type EitherLeft } from "../left";
|
|
5
5
|
import { type EitherRight } from "../right";
|
|
6
6
|
import { bool } from "./create";
|
|
7
|
-
export declare const eitherBoolTruthyKind: import("../../common").KindHandler<import("../../common").KindDefinition<"@
|
|
7
|
+
export declare const eitherBoolTruthyKind: import("../../common").KindHandler<import("../../common").KindDefinition<"@DuplojsUtilsEither/bool-truthy", unknown>>;
|
|
8
8
|
type _EitherBoolTruthy<GenericValue extends unknown = unknown> = (EitherRight<"bool", GenericValue> & Kind<typeof eitherBoolKind.definition> & Kind<typeof eitherBoolTruthyKind.definition>);
|
|
9
9
|
export interface EitherBoolTruthy<GenericValue extends unknown = unknown> extends _EitherBoolTruthy<GenericValue> {
|
|
10
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const eitherFutureKind: import("../..").KindHandler<import("../..").KindDefinition<"@
|
|
1
|
+
export declare const eitherFutureKind: import("../..").KindHandler<import("../..").KindDefinition<"@DuplojsUtilsEither/future", unknown>>;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var create = require('../left/create.cjs');
|
|
4
4
|
var kind = require('../kind.cjs');
|
|
5
5
|
require('../../common/globalStore.cjs');
|
|
6
|
+
require('../../common/builder.cjs');
|
|
6
7
|
var base = require('./base.cjs');
|
|
7
8
|
|
|
8
9
|
const eitherFutureErrorKind = kind.createEitherKind("future-error");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Kind } from "../../common/kind";
|
|
2
2
|
import { type EitherLeft } from "../left";
|
|
3
3
|
import { eitherFutureKind } from "./base";
|
|
4
|
-
export declare const eitherFutureErrorKind: import("../../common/kind").KindHandler<import("../../common/kind").KindDefinition<"@
|
|
4
|
+
export declare const eitherFutureErrorKind: import("../../common/kind").KindHandler<import("../../common/kind").KindDefinition<"@DuplojsUtilsEither/future-error", unknown>>;
|
|
5
5
|
type _EitherFutureError = (EitherLeft<"future", unknown> & Kind<typeof eitherFutureKind.definition> & Kind<typeof eitherFutureErrorKind.definition>);
|
|
6
6
|
export interface EitherFutureError extends _EitherFutureError {
|
|
7
7
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { left } from '../left/create.mjs';
|
|
2
2
|
import { createEitherKind } from '../kind.mjs';
|
|
3
3
|
import '../../common/globalStore.mjs';
|
|
4
|
+
import '../../common/builder.mjs';
|
|
4
5
|
import { eitherFutureKind } from './base.mjs';
|
|
5
6
|
|
|
6
7
|
const eitherFutureErrorKind = createEitherKind("future-error");
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var kind = require('../kind.cjs');
|
|
4
4
|
var base = require('./base.cjs');
|
|
5
5
|
require('../../common/globalStore.cjs');
|
|
6
|
+
require('../../common/builder.cjs');
|
|
6
7
|
var create = require('../right/create.cjs');
|
|
7
8
|
|
|
8
9
|
const eitherFutureSuccessKind = kind.createEitherKind("future-success");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Kind } from "../../common/kind";
|
|
2
2
|
import { eitherFutureKind } from "./base";
|
|
3
3
|
import { type EitherRight } from "../right";
|
|
4
|
-
export declare const eitherFutureSuccessKind: import("../../common/kind").KindHandler<import("../../common/kind").KindDefinition<"@
|
|
4
|
+
export declare const eitherFutureSuccessKind: import("../../common/kind").KindHandler<import("../../common/kind").KindDefinition<"@DuplojsUtilsEither/future-success", unknown>>;
|
|
5
5
|
type _EitherFutureSuccess<GenericValue extends unknown = unknown> = (EitherRight<"future", GenericValue> & Kind<typeof eitherFutureKind.definition> & Kind<typeof eitherFutureSuccessKind.definition>);
|
|
6
6
|
export interface EitherFutureSuccess<GenericValue extends unknown = unknown> extends _EitherFutureSuccess<GenericValue> {
|
|
7
7
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createEitherKind } from '../kind.mjs';
|
|
2
2
|
import { eitherFutureKind } from './base.mjs';
|
|
3
3
|
import '../../common/globalStore.mjs';
|
|
4
|
+
import '../../common/builder.mjs';
|
|
4
5
|
import { right } from '../right/create.mjs';
|
|
5
6
|
|
|
6
7
|
const eitherFutureSuccessKind = createEitherKind("future-success");
|
package/dist/either/kind.cjs
CHANGED
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
var kind = require('../common/kind.cjs');
|
|
4
4
|
require('../common/globalStore.cjs');
|
|
5
|
+
require('../common/builder.cjs');
|
|
5
6
|
|
|
6
7
|
const createEitherKind = kind.createKindNamespace(
|
|
7
8
|
// @ts-expect-error reserved kind namespace
|
|
8
|
-
"
|
|
9
|
+
"DuplojsUtilsEither");
|
|
9
10
|
const eitherInformationKind = createEitherKind("information");
|
|
10
11
|
|
|
11
12
|
exports.createEitherKind = createEitherKind;
|
package/dist/either/kind.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const createEitherKind: <GenericName extends string, GenericKindValue extends unknown = unknown>(name: GenericName & import("../string").ForbiddenString<GenericName, "@" | "/">) => import("../common").KindHandler<import("../common").KindDefinition<`@
|
|
2
|
-
export declare const eitherInformationKind: import("../common").KindHandler<import("../common").KindDefinition<"@
|
|
1
|
+
export declare const createEitherKind: <GenericName extends string, GenericKindValue extends unknown = unknown>(name: GenericName & import("../string").ForbiddenString<GenericName, "@" | "/">) => import("../common").KindHandler<import("../common").KindDefinition<`@DuplojsUtilsEither/${GenericName}`, GenericKindValue>>;
|
|
2
|
+
export declare const eitherInformationKind: import("../common").KindHandler<import("../common").KindDefinition<"@DuplojsUtilsEither/information", string>>;
|
package/dist/either/kind.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { createKindNamespace } from '../common/kind.mjs';
|
|
2
2
|
import '../common/globalStore.mjs';
|
|
3
|
+
import '../common/builder.mjs';
|
|
3
4
|
|
|
4
5
|
const createEitherKind = createKindNamespace(
|
|
5
6
|
// @ts-expect-error reserved kind namespace
|
|
6
|
-
"
|
|
7
|
+
"DuplojsUtilsEither");
|
|
7
8
|
const eitherInformationKind = createEitherKind("information");
|
|
8
9
|
|
|
9
10
|
export { createEitherKind, eitherInformationKind };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Kind } from "../../common/kind";
|
|
2
2
|
import { type WrappedValue } from "../../common/wrapValue";
|
|
3
3
|
import { eitherInformationKind } from "../kind";
|
|
4
|
-
export declare const eitherLeftKind: import("../../common/kind").KindHandler<import("../../common/kind").KindDefinition<"@
|
|
4
|
+
export declare const eitherLeftKind: import("../../common/kind").KindHandler<import("../../common/kind").KindDefinition<"@DuplojsUtilsEither/left", unknown>>;
|
|
5
5
|
type _EitherLeft<GenericInformation extends string = string, GenericValue extends unknown = unknown> = (Kind<typeof eitherLeftKind.definition> & Kind<typeof eitherInformationKind.definition, GenericInformation> & WrappedValue<GenericValue>);
|
|
6
6
|
export interface EitherLeft<GenericInformation extends string = string, GenericValue extends unknown = unknown> extends _EitherLeft<GenericInformation, GenericValue> {
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Kind } from "../../common/kind";
|
|
2
2
|
import { type EitherLeft } from "./create";
|
|
3
|
-
export declare const eitherErrorKind: import("../../common/kind").KindHandler<import("../../common/kind").KindDefinition<"@
|
|
3
|
+
export declare const eitherErrorKind: import("../../common/kind").KindHandler<import("../../common/kind").KindDefinition<"@DuplojsUtilsEither/error", unknown>>;
|
|
4
4
|
type _EitherError<GenericValue extends unknown = unknown> = (EitherLeft<"error", GenericValue> & Kind<typeof eitherErrorKind.definition>);
|
|
5
5
|
export interface EitherError<GenericValue extends unknown = unknown> extends _EitherError<GenericValue> {
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Kind } from "../../common/kind";
|
|
2
2
|
import { type EitherLeft } from "./create";
|
|
3
|
-
export declare const eitherFailKind: import("../../common/kind").KindHandler<import("../../common/kind").KindDefinition<"@
|
|
3
|
+
export declare const eitherFailKind: import("../../common/kind").KindHandler<import("../../common/kind").KindDefinition<"@DuplojsUtilsEither/fail", unknown>>;
|
|
4
4
|
type _EitherFail = (EitherLeft<"fail", never> & Kind<typeof eitherFailKind.definition>);
|
|
5
5
|
export interface EitherFail extends _EitherFail {
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const eitherNullableKind: import("../..").KindHandler<import("../..").KindDefinition<"@
|
|
1
|
+
export declare const eitherNullableKind: import("../..").KindHandler<import("../..").KindDefinition<"@DuplojsUtilsEither/nullable", unknown>>;
|
|
@@ -4,7 +4,7 @@ import { type EitherLeft } from "../left";
|
|
|
4
4
|
import { type EitherRight } from "../right";
|
|
5
5
|
import { nullable } from "./create";
|
|
6
6
|
import { eitherNullableKind } from "./base";
|
|
7
|
-
export declare const eitherNullableEmptyKind: import("../../common").KindHandler<import("../../common").KindDefinition<"@
|
|
7
|
+
export declare const eitherNullableEmptyKind: import("../../common").KindHandler<import("../../common").KindDefinition<"@DuplojsUtilsEither/nullable-empty", unknown>>;
|
|
8
8
|
type _EitherNullableEmpty = (EitherLeft<"nullable", null> & Kind<typeof eitherNullableKind.definition> & Kind<typeof eitherNullableEmptyKind.definition>);
|
|
9
9
|
export interface EitherNullableEmpty extends _EitherNullableEmpty {
|
|
10
10
|
}
|
|
@@ -4,7 +4,7 @@ import { type EitherLeft } from "../left";
|
|
|
4
4
|
import { type EitherRight } from "../right";
|
|
5
5
|
import { nullable } from "./create";
|
|
6
6
|
import { eitherNullableKind } from "./base";
|
|
7
|
-
export declare const eitherNullableFilledKind: import("../../common").KindHandler<import("../../common").KindDefinition<"@
|
|
7
|
+
export declare const eitherNullableFilledKind: import("../../common").KindHandler<import("../../common").KindDefinition<"@DuplojsUtilsEither/nullable-filled", unknown>>;
|
|
8
8
|
type _EitherNullableFilled<GenericValue extends unknown = unknown> = (EitherRight<"nullable", GenericValue> & Kind<typeof eitherNullableKind.definition> & Kind<typeof eitherNullableFilledKind.definition>);
|
|
9
9
|
export interface EitherNullableFilled<GenericValue extends unknown = unknown> extends _EitherNullableFilled<GenericValue> {
|
|
10
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const eitherNullishKind: import("../..").KindHandler<import("../..").KindDefinition<"@
|
|
1
|
+
export declare const eitherNullishKind: import("../..").KindHandler<import("../..").KindDefinition<"@DuplojsUtilsEither/nullish", unknown>>;
|
|
@@ -5,7 +5,7 @@ import { type EitherRight } from "../right";
|
|
|
5
5
|
import { nullish } from "./create";
|
|
6
6
|
import { eitherNullishKind } from "./base";
|
|
7
7
|
export type NullishValue = null | undefined;
|
|
8
|
-
export declare const eitherNullishEmptyKind: import("../../common").KindHandler<import("../../common").KindDefinition<"@
|
|
8
|
+
export declare const eitherNullishEmptyKind: import("../../common").KindHandler<import("../../common").KindDefinition<"@DuplojsUtilsEither/nullish-empty", unknown>>;
|
|
9
9
|
type _EitherNullishEmpty<GenericValue extends NullishValue = NullishValue> = (EitherLeft<"nullish", GenericValue> & Kind<typeof eitherNullishKind.definition> & Kind<typeof eitherNullishEmptyKind.definition>);
|
|
10
10
|
export interface EitherNullishEmpty<GenericValue extends NullishValue = NullishValue> extends _EitherNullishEmpty<GenericValue> {
|
|
11
11
|
}
|
|
@@ -4,6 +4,7 @@ var kind = require('../kind.cjs');
|
|
|
4
4
|
var is$1 = require('../left/is.cjs');
|
|
5
5
|
var unwrap = require('../../common/unwrap.cjs');
|
|
6
6
|
require('../../common/globalStore.cjs');
|
|
7
|
+
require('../../common/builder.cjs');
|
|
7
8
|
var create = require('../right/create.cjs');
|
|
8
9
|
var is = require('../right/is.cjs');
|
|
9
10
|
var create$1 = require('./create.cjs');
|
|
@@ -4,7 +4,7 @@ import { nullish } from "./create";
|
|
|
4
4
|
import { type Kind } from "../../common/kind";
|
|
5
5
|
import { type EscapeVoid, type AnyValue, type Unwrap, type BreakGenericLink } from "../../common";
|
|
6
6
|
import { eitherNullishKind } from "./base";
|
|
7
|
-
export declare const eitherNullishFilledKind: import("../../common").KindHandler<import("../../common").KindDefinition<"@
|
|
7
|
+
export declare const eitherNullishFilledKind: import("../../common").KindHandler<import("../../common").KindDefinition<"@DuplojsUtilsEither/nullish-filled", unknown>>;
|
|
8
8
|
type _EitherNullishFilled<GenericValue extends unknown = unknown> = (EitherRight<"nullish", GenericValue> & Kind<typeof eitherNullishKind.definition> & Kind<typeof eitherNullishFilledKind.definition>);
|
|
9
9
|
export interface EitherNullishFilled<GenericValue extends unknown = unknown> extends _EitherNullishFilled<GenericValue> {
|
|
10
10
|
}
|
|
@@ -2,6 +2,7 @@ import { createEitherKind } from '../kind.mjs';
|
|
|
2
2
|
import { isLeft } from '../left/is.mjs';
|
|
3
3
|
import { unwrap } from '../../common/unwrap.mjs';
|
|
4
4
|
import '../../common/globalStore.mjs';
|
|
5
|
+
import '../../common/builder.mjs';
|
|
5
6
|
import { right } from '../right/create.mjs';
|
|
6
7
|
import { isRight } from '../right/is.mjs';
|
|
7
8
|
import { nullish } from './create.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const eitherOptionalKind: import("../..").KindHandler<import("../..").KindDefinition<"@
|
|
1
|
+
export declare const eitherOptionalKind: import("../..").KindHandler<import("../..").KindDefinition<"@DuplojsUtilsEither/optional", unknown>>;
|
|
@@ -6,6 +6,7 @@ var create$1 = require('./create.cjs');
|
|
|
6
6
|
var create = require('../left/create.cjs');
|
|
7
7
|
var is = require('../left/is.cjs');
|
|
8
8
|
require('../../common/globalStore.cjs');
|
|
9
|
+
require('../../common/builder.cjs');
|
|
9
10
|
var is$1 = require('../right/is.cjs');
|
|
10
11
|
|
|
11
12
|
const eitherOptionalEmptyKind = kind.createEitherKind("optional-empty");
|
|
@@ -4,7 +4,7 @@ import { eitherOptionalKind } from "./base";
|
|
|
4
4
|
import { optional } from "./create";
|
|
5
5
|
import { type EitherLeft } from "../left";
|
|
6
6
|
import { type EitherRight } from "../right";
|
|
7
|
-
export declare const eitherOptionalEmptyKind: import("../../common").KindHandler<import("../../common").KindDefinition<"@
|
|
7
|
+
export declare const eitherOptionalEmptyKind: import("../../common").KindHandler<import("../../common").KindDefinition<"@DuplojsUtilsEither/optional-empty", unknown>>;
|
|
8
8
|
type _EitherOptionalEmpty = (EitherLeft<"optional", undefined> & Kind<typeof eitherOptionalKind.definition> & Kind<typeof eitherOptionalEmptyKind.definition>);
|
|
9
9
|
export interface EitherOptionalEmpty extends _EitherOptionalEmpty {
|
|
10
10
|
}
|
|
@@ -4,6 +4,7 @@ import { optional } from './create.mjs';
|
|
|
4
4
|
import { left } from '../left/create.mjs';
|
|
5
5
|
import { isLeft } from '../left/is.mjs';
|
|
6
6
|
import '../../common/globalStore.mjs';
|
|
7
|
+
import '../../common/builder.mjs';
|
|
7
8
|
import { isRight } from '../right/is.mjs';
|
|
8
9
|
|
|
9
10
|
const eitherOptionalEmptyKind = createEitherKind("optional-empty");
|
|
@@ -4,7 +4,7 @@ import { eitherOptionalKind } from "./base";
|
|
|
4
4
|
import { optional } from "./create";
|
|
5
5
|
import { type EitherLeft } from "../left";
|
|
6
6
|
import { type EitherRight } from "../right";
|
|
7
|
-
export declare const eitherOptionalFilledKind: import("../../common").KindHandler<import("../../common").KindDefinition<"@
|
|
7
|
+
export declare const eitherOptionalFilledKind: import("../../common").KindHandler<import("../../common").KindDefinition<"@DuplojsUtilsEither/optional-filled", unknown>>;
|
|
8
8
|
type _EitherOptionalFilled<GenericValue extends unknown = unknown> = (EitherRight<"optional", GenericValue> & Kind<typeof eitherOptionalKind.definition> & Kind<typeof eitherOptionalFilledKind.definition>);
|
|
9
9
|
export interface EitherOptionalFilled<GenericValue extends unknown = unknown> extends _EitherOptionalFilled<GenericValue> {
|
|
10
10
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { unwrap } from '../../common/unwrap.mjs';
|
|
2
2
|
import '../../common/globalStore.mjs';
|
|
3
|
+
import '../../common/builder.mjs';
|
|
3
4
|
import { createEitherKind } from '../kind.mjs';
|
|
4
5
|
import { eitherOptionalKind } from './base.mjs';
|
|
5
6
|
import { optional } from './create.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Kind } from "../../common/kind";
|
|
2
2
|
import { type WrappedValue } from "../../common/wrapValue";
|
|
3
3
|
import { eitherInformationKind } from "../kind";
|
|
4
|
-
export declare const eitherRightKind: import("../../common/kind").KindHandler<import("../../common/kind").KindDefinition<"@
|
|
4
|
+
export declare const eitherRightKind: import("../../common/kind").KindHandler<import("../../common/kind").KindDefinition<"@DuplojsUtilsEither/right", unknown>>;
|
|
5
5
|
type _EitherRight<GenericInformation extends string = string, GenericValue extends unknown = unknown> = (Kind<typeof eitherRightKind.definition> & Kind<typeof eitherInformationKind.definition, GenericInformation> & WrappedValue<GenericValue>);
|
|
6
6
|
export interface EitherRight<GenericInformation extends string = string, GenericValue extends unknown = unknown> extends _EitherRight<GenericInformation, GenericValue> {
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Kind } from "../../common/kind";
|
|
2
2
|
import { type EitherRight } from "./create";
|
|
3
|
-
export declare const eitherOkKind: import("../../common/kind").KindHandler<import("../../common/kind").KindDefinition<"@
|
|
3
|
+
export declare const eitherOkKind: import("../../common/kind").KindHandler<import("../../common/kind").KindDefinition<"@DuplojsUtilsEither/ok", unknown>>;
|
|
4
4
|
type _EitherOk = (EitherRight<"ok", never> & Kind<typeof eitherOkKind.definition>);
|
|
5
5
|
export interface EitherOk extends _EitherOk {
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Kind } from "../../common/kind";
|
|
2
2
|
import { type EitherRight } from "./create";
|
|
3
|
-
export declare const eitherSuccessKind: import("../../common/kind").KindHandler<import("../../common/kind").KindDefinition<"@
|
|
3
|
+
export declare const eitherSuccessKind: import("../../common/kind").KindHandler<import("../../common/kind").KindDefinition<"@DuplojsUtilsEither/success", unknown>>;
|
|
4
4
|
type _EitherSuccess<GenericValue extends unknown = unknown> = (EitherRight<"success", GenericValue> & Kind<typeof eitherSuccessKind.definition>);
|
|
5
5
|
export interface EitherSuccess<GenericValue extends unknown = unknown> extends _EitherSuccess<GenericValue> {
|
|
6
6
|
}
|