typebox 1.2.3 → 1.2.5
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/build/type/action/_add_immutable.d.mts +11 -0
- package/build/type/action/_add_immutable.mjs +11 -0
- package/build/type/action/_add_optional.d.mts +11 -0
- package/build/type/action/_add_optional.mjs +11 -0
- package/build/type/action/_add_readonly.d.mts +11 -0
- package/build/type/action/_add_readonly.mjs +11 -0
- package/build/type/action/_remove_immutable.d.mts +11 -0
- package/build/type/action/_remove_immutable.mjs +11 -0
- package/build/type/action/_remove_optional.d.mts +11 -0
- package/build/type/action/_remove_optional.mjs +11 -0
- package/build/type/action/_remove_readonly.d.mts +11 -0
- package/build/type/action/_remove_readonly.mjs +11 -0
- package/build/type/action/index.d.mts +6 -2
- package/build/type/action/index.mjs +6 -2
- package/build/type/action/module.d.mts +8 -7
- package/build/type/action/module.mjs +7 -6
- package/build/type/engine/evaluate/composite.d.mts +10 -6
- package/build/type/engine/evaluate/composite.mjs +10 -6
- package/build/type/engine/immutable/instantiate_add.d.mts +10 -0
- package/build/type/engine/immutable/instantiate_add.mjs +14 -0
- package/build/type/engine/immutable/instantiate_remove.d.mts +10 -0
- package/build/type/engine/immutable/instantiate_remove.mjs +14 -0
- package/build/type/engine/instantiate.d.mts +33 -16
- package/build/type/engine/instantiate.mjs +61 -61
- package/build/type/engine/module/instantiate.d.mts +7 -7
- package/build/type/engine/module/instantiate.mjs +16 -15
- package/build/type/engine/optional/instantiate_add.d.mts +10 -0
- package/build/type/engine/optional/instantiate_add.mjs +14 -0
- package/build/type/engine/optional/instantiate_remove.d.mts +10 -0
- package/build/type/engine/optional/instantiate_remove.mjs +14 -0
- package/build/type/engine/partial/from_object.d.mts +2 -2
- package/build/type/engine/partial/from_object.mjs +2 -2
- package/build/type/engine/readonly/instantiate_add.d.mts +10 -0
- package/build/type/engine/readonly/instantiate_add.mjs +14 -0
- package/build/type/engine/readonly/instantiate_remove.d.mts +10 -0
- package/build/type/engine/readonly/instantiate_remove.mjs +14 -0
- package/build/type/engine/readonly_object/from_array.d.mts +2 -2
- package/build/type/engine/readonly_object/from_array.mjs +2 -2
- package/build/type/engine/readonly_object/from_object.d.mts +2 -2
- package/build/type/engine/readonly_object/from_object.mjs +2 -2
- package/build/type/engine/readonly_object/from_tuple.d.mts +2 -2
- package/build/type/engine/readonly_object/from_tuple.mjs +2 -2
- package/build/type/engine/required/from_object.d.mts +2 -2
- package/build/type/engine/required/from_object.mjs +2 -2
- package/build/type/engine/template_literal/is_pattern.mjs +1 -0
- package/build/type/script/mapping.d.mts +42 -42
- package/build/type/script/mapping.mjs +46 -46
- package/build/type/types/_immutable.d.mts +2 -9
- package/build/type/types/_immutable.mjs +2 -10
- package/build/type/types/_optional.d.mts +2 -9
- package/build/type/types/_optional.mjs +2 -11
- package/build/type/types/_readonly.d.mts +2 -9
- package/build/type/types/_readonly.mjs +2 -10
- package/build/type/types/deferred.d.mts +1 -0
- package/build/type/types/deferred.mjs +1 -1
- package/package.json +1 -1
- package/build/type/action/_optional.d.mts +0 -19
- package/build/type/action/_optional.mjs +0 -40
- package/build/type/action/_readonly.d.mts +0 -19
- package/build/type/action/_readonly.mjs +0 -40
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { type TSchema } from '../types/schema.mjs';
|
|
2
|
-
/** Represents a operation to apply Optional to a property */
|
|
3
|
-
export interface TOptionalAddAction<Type extends TSchema = TSchema> extends TSchema {
|
|
4
|
-
'~kind': 'OptionalAddAction';
|
|
5
|
-
type: Type;
|
|
6
|
-
}
|
|
7
|
-
/** Creates an OptionalAddAction. */
|
|
8
|
-
export declare function OptionalAddAction<Type extends TSchema>(type: Type): TOptionalAddAction<Type>;
|
|
9
|
-
/** Returns true if this value is a OptionalAddAction. */
|
|
10
|
-
export declare function IsOptionalAddAction(value: unknown): value is TOptionalAddAction;
|
|
11
|
-
/** Represents a operation to remove Optional from a property */
|
|
12
|
-
export interface TOptionalRemoveAction<Type extends TSchema = TSchema> extends TSchema {
|
|
13
|
-
'~kind': 'OptionalRemoveAction';
|
|
14
|
-
type: Type;
|
|
15
|
-
}
|
|
16
|
-
/** Creates a OptionalRemoveAction. */
|
|
17
|
-
export declare function OptionalRemoveAction<Type extends TSchema>(type: Type): TOptionalRemoveAction<Type>;
|
|
18
|
-
/** Returns true if this value is a OptionalRemoveAction. */
|
|
19
|
-
export declare function IsOptionalRemoveAction(value: unknown): value is TOptionalRemoveAction;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
// deno-fmt-ignore-file
|
|
2
|
-
import { Memory } from '../../system/memory/index.mjs';
|
|
3
|
-
import { Guard } from '../../guard/index.mjs';
|
|
4
|
-
import { IsSchema } from '../types/schema.mjs';
|
|
5
|
-
// ------------------------------------------------------------------
|
|
6
|
-
// Action
|
|
7
|
-
// ------------------------------------------------------------------
|
|
8
|
-
/** Creates an OptionalAddAction. */
|
|
9
|
-
export function OptionalAddAction(type) {
|
|
10
|
-
return Memory.Create({ ['~kind']: 'OptionalAddAction' }, { type }, {});
|
|
11
|
-
}
|
|
12
|
-
// ------------------------------------------------------------------
|
|
13
|
-
// Guard
|
|
14
|
-
// ------------------------------------------------------------------
|
|
15
|
-
/** Returns true if this value is a OptionalAddAction. */
|
|
16
|
-
export function IsOptionalAddAction(value) {
|
|
17
|
-
return Guard.IsObject(value)
|
|
18
|
-
&& Guard.HasPropertyKey(value, '~kind')
|
|
19
|
-
&& Guard.HasPropertyKey(value, 'type')
|
|
20
|
-
&& Guard.IsEqual(value['~kind'], 'OptionalAddAction')
|
|
21
|
-
&& IsSchema(value.type);
|
|
22
|
-
}
|
|
23
|
-
// ------------------------------------------------------------------
|
|
24
|
-
// Factory
|
|
25
|
-
// ------------------------------------------------------------------
|
|
26
|
-
/** Creates a OptionalRemoveAction. */
|
|
27
|
-
export function OptionalRemoveAction(type) {
|
|
28
|
-
return Memory.Create({ ['~kind']: 'OptionalRemoveAction' }, { type }, {});
|
|
29
|
-
}
|
|
30
|
-
// ------------------------------------------------------------------
|
|
31
|
-
// Guard
|
|
32
|
-
// ------------------------------------------------------------------
|
|
33
|
-
/** Returns true if this value is a OptionalRemoveAction. */
|
|
34
|
-
export function IsOptionalRemoveAction(value) {
|
|
35
|
-
return Guard.IsObject(value)
|
|
36
|
-
&& Guard.HasPropertyKey(value, '~kind')
|
|
37
|
-
&& Guard.HasPropertyKey(value, 'type')
|
|
38
|
-
&& Guard.IsEqual(value['~kind'], 'OptionalRemoveAction')
|
|
39
|
-
&& IsSchema(value.type);
|
|
40
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { type TSchema } from '../types/schema.mjs';
|
|
2
|
-
/** Represents an operation to apply Readonly to a property. */
|
|
3
|
-
export interface TReadonlyAddAction<Type extends TSchema = TSchema> extends TSchema {
|
|
4
|
-
'~kind': 'ReadonlyAddAction';
|
|
5
|
-
type: Type;
|
|
6
|
-
}
|
|
7
|
-
/** Creates a ReadonlyAddAction. */
|
|
8
|
-
export declare function ReadonlyAddAction<Type extends TSchema>(type: Type): TReadonlyAddAction<Type>;
|
|
9
|
-
/** Returns true if this value is a ReadonlyAddAction. */
|
|
10
|
-
export declare function IsReadonlyAddAction(value: unknown): value is TReadonlyAddAction;
|
|
11
|
-
/** Represents an action to remove Readonly from a property. */
|
|
12
|
-
export interface TReadonlyRemoveAction<Type extends TSchema = TSchema> extends TSchema {
|
|
13
|
-
'~kind': 'ReadonlyRemoveAction';
|
|
14
|
-
type: Type;
|
|
15
|
-
}
|
|
16
|
-
/** Creates a ReadonlyRemoveAction. */
|
|
17
|
-
export declare function ReadonlyRemoveAction<Type extends TSchema>(type: Type): TReadonlyRemoveAction<Type>;
|
|
18
|
-
/** Returns true if this value is a ReadonlyRemoveAction. */
|
|
19
|
-
export declare function IsReadonlyRemoveAction(value: unknown): value is TReadonlyRemoveAction;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
// deno-fmt-ignore-file
|
|
2
|
-
import { Memory } from '../../system/memory/index.mjs';
|
|
3
|
-
import { Guard } from '../../guard/index.mjs';
|
|
4
|
-
import { IsSchema } from '../types/schema.mjs';
|
|
5
|
-
// ------------------------------------------------------------------
|
|
6
|
-
// Action
|
|
7
|
-
// ------------------------------------------------------------------
|
|
8
|
-
/** Creates a ReadonlyAddAction. */
|
|
9
|
-
export function ReadonlyAddAction(type) {
|
|
10
|
-
return Memory.Create({ ['~kind']: 'ReadonlyAddAction' }, { type }, {});
|
|
11
|
-
}
|
|
12
|
-
// ------------------------------------------------------------------
|
|
13
|
-
// Guard
|
|
14
|
-
// ------------------------------------------------------------------
|
|
15
|
-
/** Returns true if this value is a ReadonlyAddAction. */
|
|
16
|
-
export function IsReadonlyAddAction(value) {
|
|
17
|
-
return Guard.IsObject(value)
|
|
18
|
-
&& Guard.HasPropertyKey(value, '~kind')
|
|
19
|
-
&& Guard.HasPropertyKey(value, 'type')
|
|
20
|
-
&& Guard.IsEqual(value['~kind'], 'ReadonlyAddAction')
|
|
21
|
-
&& IsSchema(value.type);
|
|
22
|
-
}
|
|
23
|
-
// ------------------------------------------------------------------
|
|
24
|
-
// Factory
|
|
25
|
-
// ------------------------------------------------------------------
|
|
26
|
-
/** Creates a ReadonlyRemoveAction. */
|
|
27
|
-
export function ReadonlyRemoveAction(type) {
|
|
28
|
-
return Memory.Create({ ['~kind']: 'ReadonlyRemoveAction' }, { type }, {});
|
|
29
|
-
}
|
|
30
|
-
// ------------------------------------------------------------------
|
|
31
|
-
// Guard
|
|
32
|
-
// ------------------------------------------------------------------
|
|
33
|
-
/** Returns true if this value is a ReadonlyRemoveAction. */
|
|
34
|
-
export function IsReadonlyRemoveAction(value) {
|
|
35
|
-
return Guard.IsObject(value)
|
|
36
|
-
&& Guard.HasPropertyKey(value, '~kind')
|
|
37
|
-
&& Guard.HasPropertyKey(value, 'type')
|
|
38
|
-
&& Guard.IsEqual(value['~kind'], 'ReadonlyRemoveAction')
|
|
39
|
-
&& IsSchema(value.type);
|
|
40
|
-
}
|