pema 0.6.0 → 0.7.0

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.
Files changed (162) hide show
  1. package/lib/private/ArrayType.d.ts +1 -1
  2. package/lib/private/ArrayType.js +11 -4
  3. package/lib/private/BuiltinType.d.ts +1 -1
  4. package/lib/private/BuiltinType.js +6 -2
  5. package/lib/private/ConstructorType.d.ts +1 -1
  6. package/lib/private/ConstructorType.js +3 -1
  7. package/lib/private/DefaultType.d.ts +1 -1
  8. package/lib/private/DefaultType.js +6 -5
  9. package/lib/private/EnumType.d.ts +1 -1
  10. package/lib/private/EnumType.js +5 -2
  11. package/lib/private/FunctionType.d.ts +1 -1
  12. package/lib/private/FunctionType.js +6 -3
  13. package/lib/private/IntType.d.ts +1 -1
  14. package/lib/private/IntType.js +2 -2
  15. package/lib/private/IsType.d.ts +1 -1
  16. package/lib/private/IsType.js +3 -1
  17. package/lib/private/JSONType.d.ts +3 -2
  18. package/lib/private/JSONType.js +3 -1
  19. package/lib/private/LiteralType.d.ts +1 -2
  20. package/lib/private/LiteralType.js +3 -4
  21. package/lib/private/Loose.d.ts +4 -0
  22. package/lib/private/Loose.js +3 -0
  23. package/lib/private/NormalizeSchema.d.ts +3 -3
  24. package/lib/private/NullType.d.ts +1 -1
  25. package/lib/private/NullType.js +5 -2
  26. package/lib/private/NumericType.d.ts +2 -1
  27. package/lib/private/ObjectType.d.ts +1 -1
  28. package/lib/private/ObjectType.js +18 -5
  29. package/lib/private/OmitType.d.ts +1 -1
  30. package/lib/private/OmitType.js +3 -1
  31. package/lib/private/OptionalType.d.ts +1 -1
  32. package/lib/private/OptionalType.js +6 -5
  33. package/lib/private/ParseError.d.ts +1 -1
  34. package/lib/private/ParseError.js +9 -8
  35. package/lib/private/ParseOptions.d.ts +2 -1
  36. package/lib/private/Parsed.d.ts +4 -3
  37. package/lib/private/Parsed.js +2 -3
  38. package/lib/private/PartialType.d.ts +1 -1
  39. package/lib/private/PartialType.js +3 -1
  40. package/lib/private/PrimitiveType.d.ts +1 -1
  41. package/lib/private/PrimitiveType.js +7 -4
  42. package/lib/private/PureType.d.ts +1 -1
  43. package/lib/private/PureType.js +2 -2
  44. package/lib/private/RecordType.d.ts +1 -1
  45. package/lib/private/RecordType.js +3 -1
  46. package/lib/private/Storable.d.ts +1 -0
  47. package/lib/private/Storable.js +4 -0
  48. package/lib/private/StoreType.d.ts +1 -1
  49. package/lib/private/StoreType.js +4 -2
  50. package/lib/private/TupleType.d.ts +1 -1
  51. package/lib/private/TupleType.js +11 -4
  52. package/lib/private/UUIDType.d.ts +1 -1
  53. package/lib/private/UUIDType.js +3 -1
  54. package/lib/private/UUIDV4Type.d.ts +1 -1
  55. package/lib/private/UUIDV4Type.js +3 -1
  56. package/lib/private/UUIDV7Type.d.ts +1 -1
  57. package/lib/private/UUIDV7Type.js +3 -1
  58. package/lib/private/UintType.d.ts +1 -1
  59. package/lib/private/UintType.js +2 -2
  60. package/lib/private/UnionType.d.ts +1 -1
  61. package/lib/private/UnionType.js +6 -4
  62. package/lib/private/VirtualType.js +2 -2
  63. package/lib/private/array.d.ts +6 -4
  64. package/lib/private/array.js +15 -2
  65. package/lib/private/blob.d.ts +6 -2
  66. package/lib/private/blob.js +8 -1
  67. package/lib/private/boolean.d.ts +6 -5
  68. package/lib/private/boolean.js +8 -4
  69. package/lib/private/coerce/date.js +3 -5
  70. package/lib/private/coerce/int.js +1 -1
  71. package/lib/private/constructor.d.ts +6 -5
  72. package/lib/private/constructor.js +16 -1
  73. package/lib/private/date.d.ts +6 -2
  74. package/lib/private/date.js +8 -1
  75. package/lib/private/dict.d.ts +12 -2
  76. package/lib/private/dict.js +10 -2
  77. package/lib/private/enum.d.ts +9 -1
  78. package/lib/private/enum.js +14 -1
  79. package/lib/private/errors.js +5 -6
  80. package/lib/private/f32.d.ts +6 -2
  81. package/lib/private/f32.js +8 -1
  82. package/lib/private/f64.d.ts +6 -2
  83. package/lib/private/f64.js +8 -1
  84. package/lib/private/file.d.ts +6 -2
  85. package/lib/private/file.js +8 -1
  86. package/lib/private/function.d.ts +6 -5
  87. package/lib/private/function.js +8 -1
  88. package/lib/private/i128.d.ts +6 -2
  89. package/lib/private/i128.js +8 -1
  90. package/lib/private/i16.d.ts +6 -2
  91. package/lib/private/i16.js +8 -1
  92. package/lib/private/i32.d.ts +6 -2
  93. package/lib/private/i32.js +8 -1
  94. package/lib/private/i64.d.ts +6 -2
  95. package/lib/private/i64.js +8 -1
  96. package/lib/private/i8.d.ts +6 -2
  97. package/lib/private/i8.js +8 -1
  98. package/lib/private/index.d.ts +33 -15
  99. package/lib/private/index.js +148 -41
  100. package/lib/private/is-parsed.d.ts +3 -0
  101. package/lib/private/is-parsed.js +7 -0
  102. package/lib/private/is.d.ts +6 -2
  103. package/lib/private/is.js +14 -1
  104. package/lib/private/json.d.ts +12 -2
  105. package/lib/private/json.js +14 -1
  106. package/lib/private/literal.d.ts +10 -2
  107. package/lib/private/literal.js +16 -1
  108. package/lib/private/normalize.js +4 -11
  109. package/lib/private/null.d.ts +6 -2
  110. package/lib/private/null.js +8 -1
  111. package/lib/private/object.d.ts +11 -4
  112. package/lib/private/object.js +22 -1
  113. package/lib/private/omit.d.ts +9 -1
  114. package/lib/private/omit.js +14 -1
  115. package/lib/private/partial.d.ts +9 -2
  116. package/lib/private/partial.js +16 -2
  117. package/lib/private/path/next.d.ts +1 -7
  118. package/lib/private/pure.d.ts +9 -1
  119. package/lib/private/pure.js +14 -1
  120. package/lib/private/record.d.ts +6 -5
  121. package/lib/private/record.js +14 -1
  122. package/lib/private/resolve.d.ts +2 -0
  123. package/lib/private/resolve.js +7 -0
  124. package/lib/private/spec/bigint.d.ts +4 -1
  125. package/lib/private/spec/bigint.js +27 -26
  126. package/lib/private/spec/biguint.d.ts +4 -1
  127. package/lib/private/spec/biguint.js +23 -22
  128. package/lib/private/spec/int.d.ts +4 -1
  129. package/lib/private/spec/int.js +24 -23
  130. package/lib/private/spec/uint.d.ts +4 -1
  131. package/lib/private/spec/uint.js +22 -21
  132. package/lib/private/string.d.ts +6 -5
  133. package/lib/private/string.js +8 -4
  134. package/lib/private/symbol.d.ts +6 -2
  135. package/lib/private/symbol.js +8 -1
  136. package/lib/private/test.d.ts +4 -21
  137. package/lib/private/test.js +0 -44
  138. package/lib/private/tuple.d.ts +9 -2
  139. package/lib/private/tuple.js +16 -1
  140. package/lib/private/u128.d.ts +6 -2
  141. package/lib/private/u128.js +8 -1
  142. package/lib/private/u16.d.ts +6 -2
  143. package/lib/private/u16.js +8 -1
  144. package/lib/private/u32.d.ts +6 -5
  145. package/lib/private/u32.js +8 -1
  146. package/lib/private/u64.d.ts +6 -2
  147. package/lib/private/u64.js +8 -1
  148. package/lib/private/u8.d.ts +6 -2
  149. package/lib/private/u8.js +8 -1
  150. package/lib/private/undefined.d.ts +6 -2
  151. package/lib/private/undefined.js +8 -1
  152. package/lib/private/union.d.ts +12 -3
  153. package/lib/private/union.js +14 -1
  154. package/lib/private/unknown.d.ts +6 -5
  155. package/lib/private/unknown.js +8 -1
  156. package/lib/private/url.d.ts +6 -2
  157. package/lib/private/url.js +8 -1
  158. package/lib/private/uuid.d.ts +6 -2
  159. package/lib/private/uuid.js +8 -1
  160. package/package.json +7 -6
  161. package/lib/private/is-parsed-type.d.ts +0 -3
  162. package/lib/private/is-parsed-type.js +0 -6
@@ -6,6 +6,16 @@ import type StringType from "#StringType";
6
6
  *
7
7
  * @param of - The value type (defaults to p.string)
8
8
  */
9
- export default function dict(): RecordType<StringType, StringType>;
10
- export default function dict<const Value extends Parsed<unknown>>(of: Value): RecordType<StringType, Value>;
9
+ declare function vanilla(): RecordType<StringType, StringType>;
10
+ declare function vanilla<const Value extends Parsed<unknown>>(of: Value): RecordType<StringType, Value>;
11
+ declare function loose(): RecordType<StringType, StringType>;
12
+ declare function loose<const Value extends Parsed<unknown>>(of: Value): RecordType<StringType, Value>;
13
+ declare function strict(): RecordType<StringType, StringType>;
14
+ declare function strict<const Value extends Parsed<unknown>>(of: Value): RecordType<StringType, Value>;
15
+ declare const dict: {
16
+ vanilla: typeof vanilla;
17
+ loose: typeof loose;
18
+ strict: typeof strict;
19
+ };
20
+ export default dict;
11
21
  //# sourceMappingURL=dict.d.ts.map
@@ -1,6 +1,14 @@
1
1
  import record from "#record";
2
2
  import string from "#string";
3
- export default function dict(of = string) {
4
- return record(string, of);
3
+ function vanilla(of = string.strict) {
4
+ return record.vanilla(string.strict, of);
5
5
  }
6
+ function loose(of = string.loose) {
7
+ return record.loose(string.loose, of);
8
+ }
9
+ function strict(of = string.loose) {
10
+ return record.strict(string.loose, of);
11
+ }
12
+ const dict = { vanilla, loose, strict };
13
+ export default dict;
6
14
  //# sourceMappingURL=dict.js.map
@@ -1,3 +1,11 @@
1
1
  import EnumType from "#EnumType";
2
- export default function _enum<T extends readonly string[]>(values: T): EnumType<T>;
2
+ declare function vanilla<T extends readonly string[]>(values: T): EnumType<T>;
3
+ declare function loose<T extends readonly string[]>(values: T): EnumType<T>;
4
+ declare function strict<T extends readonly string[]>(values: T): EnumType<T>;
5
+ declare const _enum: {
6
+ vanilla: typeof vanilla;
7
+ loose: typeof loose;
8
+ strict: typeof strict;
9
+ };
10
+ export default _enum;
3
11
  //# sourceMappingURL=enum.d.ts.map
@@ -1,5 +1,18 @@
1
1
  import EnumType from "#EnumType";
2
- export default function _enum(values) {
2
+ import Loose from "#Loose";
3
+ function vanilla(values) {
3
4
  return new EnumType(values);
4
5
  }
6
+ function loose(values) {
7
+ const i = new EnumType(values);
8
+ i[Loose] = true;
9
+ return i;
10
+ }
11
+ function strict(values) {
12
+ const i = new EnumType(values);
13
+ i[Loose] = false;
14
+ return i;
15
+ }
16
+ const _enum = { vanilla, loose, strict };
17
+ export default _enum;
5
18
  //# sourceMappingURL=enum.js.map
@@ -1,16 +1,15 @@
1
1
  import ParsedKey from "#ParsedKey";
2
2
  import ParseError from "#ParseError";
3
+ import is from "@rcompat/is";
3
4
  function print_got(x) {
4
- if (x === undefined)
5
+ if (is.undefined(x))
5
6
  return "undefined";
6
- if (x === null)
7
+ if (is.null(x))
7
8
  return "null";
8
- return `\`${x?.toString() ?? x}\` (${typeof x})`;
9
+ return `\`${x.toString()}\` (${typeof x})`;
9
10
  }
10
11
  function invalid_type(input, expected, options = "") {
11
- const path = typeof options === "string"
12
- ? options
13
- : options[ParsedKey] ?? "";
12
+ const path = is.string(options) ? options : options[ParsedKey] ?? "";
14
13
  return new ParseError([{
15
14
  type: "invalid_type",
16
15
  input,
@@ -1,4 +1,8 @@
1
1
  import NumberType from "#NumberType";
2
- declare const _default: NumberType<"f32">;
3
- export default _default;
2
+ declare const f32$: {
3
+ vanilla: NumberType<"f32">;
4
+ loose: NumberType<"f32">;
5
+ strict: NumberType<"f32">;
6
+ };
7
+ export default f32$;
4
8
  //# sourceMappingURL=f32.d.ts.map
@@ -1,4 +1,11 @@
1
+ import Loose from "#Loose";
1
2
  import NumberType from "#NumberType";
2
3
  import f32 from "#validator/f32";
3
- export default new NumberType("f32", [f32]);
4
+ const vanilla = new NumberType("f32", [f32]);
5
+ const loose = new NumberType("f32", [f32]);
6
+ loose[Loose] = true;
7
+ const strict = new NumberType("f32", [f32]);
8
+ strict[Loose] = false;
9
+ const f32$ = { vanilla, loose, strict };
10
+ export default f32$;
4
11
  //# sourceMappingURL=f32.js.map
@@ -1,4 +1,8 @@
1
1
  import NumberType from "#NumberType";
2
- declare const _default: NumberType<"f64">;
3
- export default _default;
2
+ declare const f64: {
3
+ strict: NumberType<"f64">;
4
+ loose: NumberType<"f64">;
5
+ vanilla: NumberType<"f64">;
6
+ };
7
+ export default f64;
4
8
  //# sourceMappingURL=f64.d.ts.map
@@ -1,3 +1,10 @@
1
+ import Loose from "#Loose";
1
2
  import NumberType from "#NumberType";
2
- export default new NumberType("f64");
3
+ const strict = new NumberType("f64");
4
+ strict[Loose] = false;
5
+ const loose = new NumberType("f64");
6
+ loose[Loose] = true;
7
+ const vanilla = new NumberType("f64");
8
+ const f64 = { strict, loose, vanilla };
9
+ export default f64;
3
10
  //# sourceMappingURL=f64.js.map
@@ -1,4 +1,8 @@
1
1
  import FileType from "#FileType";
2
- declare const _default: FileType;
3
- export default _default;
2
+ declare const file: {
3
+ vanilla: FileType;
4
+ loose: FileType;
5
+ strict: FileType;
6
+ };
7
+ export default file;
4
8
  //# sourceMappingURL=file.d.ts.map
@@ -1,3 +1,10 @@
1
1
  import FileType from "#FileType";
2
- export default new FileType();
2
+ import Loose from "#Loose";
3
+ const vanilla = new FileType();
4
+ const loose = new FileType();
5
+ loose[Loose] = true;
6
+ const strict = new FileType();
7
+ strict[Loose] = false;
8
+ const file = { vanilla, loose, strict };
9
+ export default file;
3
10
  //# sourceMappingURL=file.js.map
@@ -1,7 +1,8 @@
1
1
  import FunctionType from "#FunctionType";
2
- /**
3
- * Value is a function.
4
- */
5
- declare const _default: FunctionType;
6
- export default _default;
2
+ declare const function$: {
3
+ vanilla: FunctionType;
4
+ loose: FunctionType;
5
+ strict: FunctionType;
6
+ };
7
+ export default function$;
7
8
  //# sourceMappingURL=function.d.ts.map
@@ -1,6 +1,13 @@
1
1
  import FunctionType from "#FunctionType";
2
+ import Loose from "#Loose";
2
3
  /**
3
4
  * Value is a function.
4
5
  */
5
- export default new FunctionType();
6
+ const vanilla = new FunctionType();
7
+ const loose = new FunctionType();
8
+ loose[Loose] = true;
9
+ const strict = new FunctionType();
10
+ strict[Loose] = false;
11
+ const function$ = { vanilla, loose, strict };
12
+ export default function$;
6
13
  //# sourceMappingURL=function.js.map
@@ -1,4 +1,8 @@
1
1
  import BigIntType from "#BigIntType";
2
- declare const _default: BigIntType<"i128">;
3
- export default _default;
2
+ declare const i128: {
3
+ vanilla: BigIntType<"i128">;
4
+ loose: BigIntType<"i128">;
5
+ strict: BigIntType<"i128">;
6
+ };
7
+ export default i128;
4
8
  //# sourceMappingURL=i128.d.ts.map
@@ -1,6 +1,13 @@
1
1
  import BigIntType from "#BigIntType";
2
+ import Loose from "#Loose";
2
3
  import range from "#validator/range";
3
4
  const from = -(2n ** 127n);
4
5
  const to = 2n ** 127n - 1n;
5
- export default new BigIntType("i128", [range(from, to)]);
6
+ const vanilla = new BigIntType("i128", [range(from, to)]);
7
+ const loose = new BigIntType("i128", [range(from, to)]);
8
+ loose[Loose] = true;
9
+ const strict = new BigIntType("i128", [range(from, to)]);
10
+ strict[Loose] = false;
11
+ const i128 = { vanilla, loose, strict };
12
+ export default i128;
6
13
  //# sourceMappingURL=i128.js.map
@@ -1,4 +1,8 @@
1
1
  import IntType from "#IntType";
2
- declare const _default: IntType<"i16">;
3
- export default _default;
2
+ declare const i16: {
3
+ vanilla: IntType<"i16">;
4
+ loose: IntType<"i16">;
5
+ strict: IntType<"i16">;
6
+ };
7
+ export default i16;
4
8
  //# sourceMappingURL=i16.d.ts.map
@@ -1,6 +1,13 @@
1
1
  import IntType from "#IntType";
2
+ import Loose from "#Loose";
2
3
  import range from "#validator/range";
3
4
  const from = -(2 ** 15);
4
5
  const to = 2 ** 15 - 1;
5
- export default new IntType("i16", [range(from, to)]);
6
+ const vanilla = new IntType("i16", [range(from, to)]);
7
+ const loose = new IntType("i16", [range(from, to)]);
8
+ loose[Loose] = true;
9
+ const strict = new IntType("i16", [range(from, to)]);
10
+ strict[Loose] = false;
11
+ const i16 = { vanilla, loose, strict };
12
+ export default i16;
6
13
  //# sourceMappingURL=i16.js.map
@@ -1,4 +1,8 @@
1
1
  import IntType from "#IntType";
2
- declare const _default: IntType<"i32">;
3
- export default _default;
2
+ declare const i32: {
3
+ vanilla: IntType<"i32">;
4
+ loose: IntType<"i32">;
5
+ strict: IntType<"i32">;
6
+ };
7
+ export default i32;
4
8
  //# sourceMappingURL=i32.d.ts.map
@@ -1,6 +1,13 @@
1
1
  import IntType from "#IntType";
2
+ import Loose from "#Loose";
2
3
  import range from "#validator/range";
3
4
  const from = -(2 ** 31);
4
5
  const to = 2 ** 31 - 1;
5
- export default new IntType("i32", [range(from, to)]);
6
+ const vanilla = new IntType("i32", [range(from, to)]);
7
+ const loose = new IntType("i32", [range(from, to)]);
8
+ loose[Loose] = true;
9
+ const strict = new IntType("i32", [range(from, to)]);
10
+ strict[Loose] = false;
11
+ const i32 = { vanilla, loose, strict };
12
+ export default i32;
6
13
  //# sourceMappingURL=i32.js.map
@@ -1,4 +1,8 @@
1
1
  import BigIntType from "#BigIntType";
2
- declare const _default: BigIntType<"i64">;
3
- export default _default;
2
+ declare const i64: {
3
+ vanilla: BigIntType<"i64">;
4
+ loose: BigIntType<"i64">;
5
+ strict: BigIntType<"i64">;
6
+ };
7
+ export default i64;
4
8
  //# sourceMappingURL=i64.d.ts.map
@@ -1,6 +1,13 @@
1
1
  import BigIntType from "#BigIntType";
2
+ import Loose from "#Loose";
2
3
  import range from "#validator/range";
3
4
  const from = -(2n ** 63n);
4
5
  const to = (2n ** 63n) - 1n;
5
- export default new BigIntType("i64", [range(from, to)]);
6
+ const vanilla = new BigIntType("i64", [range(from, to)]);
7
+ const loose = new BigIntType("i64", [range(from, to)]);
8
+ loose[Loose] = true;
9
+ const strict = new BigIntType("i64", [range(from, to)]);
10
+ strict[Loose] = false;
11
+ const i64 = { vanilla, loose, strict };
12
+ export default i64;
6
13
  //# sourceMappingURL=i64.js.map
@@ -1,4 +1,8 @@
1
1
  import IntType from "#IntType";
2
- declare const _default: IntType<"i8">;
3
- export default _default;
2
+ declare const i8: {
3
+ vanilla: IntType<"i8">;
4
+ loose: IntType<"i8">;
5
+ strict: IntType<"i8">;
6
+ };
7
+ export default i8;
4
8
  //# sourceMappingURL=i8.d.ts.map
package/lib/private/i8.js CHANGED
@@ -1,6 +1,13 @@
1
1
  import IntType from "#IntType";
2
+ import Loose from "#Loose";
2
3
  import range from "#validator/range";
3
4
  const from = -(2 ** 7);
4
5
  const to = 2 ** 7 - 1;
5
- export default new IntType("i8", [range(from, to)]);
6
+ const vanilla = new IntType("i8", [range(from, to)]);
7
+ const loose = new IntType("i8", [range(from, to)]);
8
+ loose[Loose] = true;
9
+ const strict = new IntType("i8", [range(from, to)]);
10
+ strict[Loose] = false;
11
+ const i8 = { vanilla, loose, strict };
12
+ export default i8;
6
13
  //# sourceMappingURL=i8.js.map
@@ -1,4 +1,5 @@
1
1
  export type { default as ArrayType } from "#ArrayType";
2
+ export type { default as BlobType } from "#BlobType";
2
3
  export type { default as BooleanType } from "#BooleanType";
3
4
  export type { default as ConstructorType } from "#ConstructorType";
4
5
  export type { default as DataKey } from "#DataKey";
@@ -13,13 +14,15 @@ export type { default as InferStoreOut } from "#InferStoreOut";
13
14
  export type { default as Issue } from "#Issue";
14
15
  export type { default as IsType } from "#IsType";
15
16
  export type { default as JSONPayload } from "#json/JSONPayload";
17
+ export type { default as JSONType } from "#JSONType";
16
18
  export type { default as LiteralType } from "#LiteralType";
17
- export type { default as NormalizeSchema, NormalizeSchemaObject } from "#NormalizeSchema";
19
+ export type { default as NormalizeSchema, NormalizeSchemaObject, } from "#NormalizeSchema";
18
20
  export type { default as NullType } from "#NullType";
19
21
  export type { default as NumberType } from "#NumberType";
20
22
  export type { default as ObjectType } from "#ObjectType";
21
23
  export type { default as OptionalType } from "#OptionalType";
22
24
  export type { default as Parsed } from "#Parsed";
25
+ export type { default as PartialType } from "#PartialType";
23
26
  export type { default as PureType } from "#PureType";
24
27
  export type { default as RecordType } from "#RecordType";
25
28
  export type { default as Schema } from "#Schema";
@@ -33,10 +36,10 @@ export type { default as UintType } from "#UintType";
33
36
  export type { default as UndefinedType } from "#UndefinedType";
34
37
  export type { default as UnionType } from "#UnionType";
35
38
  export type { default as UnknownType } from "#UnknownType";
39
+ export type { default as URLType } from "#URLType";
36
40
  export type { default as UUIDType } from "#UUIDType";
37
41
  export type { default as UUIDV4Type } from "#UUIDV4Type";
38
42
  export type { default as UUIDV7Type } from "#UUIDV7Type";
39
- import enum_ from "#enum";
40
43
  import type NormalizeSchema from "#NormalizeSchema";
41
44
  import type Schema from "#Schema";
42
45
  /**
@@ -44,15 +47,18 @@ import type Schema from "#Schema";
44
47
  */
45
48
  declare function schema<const S extends Schema>(s: S): NormalizeSchema<S>;
46
49
  declare namespace schema {
47
- export var array: typeof import("#array").default;
50
+ export var array: <const S extends Schema>(of: S) => import("#ArrayType").default<NormalizeSchema<S>>;
48
51
  export var bigint: import("./BigIntType.js").default<"i64">;
49
52
  export var biguint: import("./BigUintType.js").default<"u64">;
50
- export var blob: import("./BlobType.js").default;
53
+ export var blob: import("#BlobType").default;
51
54
  export var boolean: import("#BooleanType").default;
52
- export var constructor: <const C extends import("@rcompat/type").AbstractNewable>(constructor: C) => import("#ConstructorType").default<C>;
55
+ export var constructor: <const C extends import("@rcompat/type").AbstractNewable>(c: C) => import("#ConstructorType").default<C>;
53
56
  export var date: import("#DateType").default;
54
- export var dict: typeof import("#dict").default;
55
- var _a: typeof enum_;
57
+ export var dict: {
58
+ (): import("#RecordType").default<import("#StringType").default, import("#StringType").default>;
59
+ <const Value extends import("#Parsed").default<unknown>>(of: Value): import("#RecordType").default<import("#StringType").default, Value>;
60
+ };
61
+ var _a: <T extends readonly string[]>(values: T) => import("#EnumType").default<T>;
56
62
  export var f32: import("#NumberType").default<"f32">;
57
63
  export var f64: import("#NumberType").default<"f64">;
58
64
  export var file: import("./FileType.js").default;
@@ -64,26 +70,38 @@ declare namespace schema {
64
70
  export var i8: import("./IntType.js").default<"i8">;
65
71
  export var int: import("./IntType.js").default<"i32">;
66
72
  export var is: <T>(predicate: (x: unknown) => x is T) => import("#IsType").default<T>;
67
- export var json: typeof import("#json").default;
73
+ export var json: {
74
+ (): import("#JSONType").default<undefined>;
75
+ <S extends import("#JSONType").ParsedJSON>(inner: S): import("#JSONType").default<S>;
76
+ };
77
+ export var literal: <T extends string | number | boolean>(literal: T) => import("#LiteralType").default<T>;
78
+ var _c: import("#NullType").default;
68
79
  export var number: import("#NumberType").default<"f64">;
69
- export var object: typeof import("#object").default;
70
- export var omit: typeof import("#omit").default;
80
+ export var object: <P extends import("@rcompat/type").Dict<Schema> = import("@rcompat/type").Dict<Schema>>(properties: P) => import("#ObjectType").default<keyof P extends never ? {} : { [K in keyof P]: NormalizeSchema<P[K]>; }>;
81
+ export var omit: <P extends import("@rcompat/type").Dict<import("#Parsed").default<unknown>>, K extends keyof P>(type: import("#ObjectType").default<P>, ...keys: K[]) => import("./OmitType.js").default<P, K>;
71
82
  export var record: <const Key extends import("./RecordTypeKey.js").default, const Value extends import("#Parsed").default<unknown>>(k: Key, v: Value) => import("#RecordType").default<Key, Value>;
72
- export var pure: typeof import("#pure").default;
83
+ export var partial: <const D extends import("./Partialable.js").default>(input: D | import("#ObjectType").default<D>) => import("#PartialType").default<{ -readonly [K in keyof D]: D[K]; }>;
84
+ export var pure: <T>() => import("#PureType").default<T, "PureType">;
73
85
  export var string: import("#StringType").default;
74
86
  export var symbol: import("./SymbolType.js").default;
75
- export var tuple: typeof import("#tuple").default;
87
+ export var tuple: <const T extends Schema[]>(...items: T) => import("#TupleType").default<{ [K in keyof T]: NormalizeSchema<T[K]>; }>;
76
88
  export var u128: import("./BigUintType.js").default<"u128">;
77
89
  export var u16: import("#UintType").default<"u16">;
78
90
  export var u32: import("#UintType").default<"u32">;
79
91
  export var u64: import("./BigUintType.js").default<"u64">;
80
92
  export var u8: import("#UintType").default<"u8">;
81
93
  export var uint: import("#UintType").default<"u32">;
82
- export var union: typeof import("#union").default;
94
+ export var undefined: import("#UndefinedType").default;
95
+ export var union: {
96
+ (): import("#UnionType").default<[]>;
97
+ <const T extends Schema[]>(...types: T): import("#UnionType").default<{ [K in keyof T]: NormalizeSchema<T[K]>; }>;
98
+ };
83
99
  export var unknown: import("#UnknownType").default;
84
- export var url: import("./URLType.js").default;
100
+ export var url: import("#URLType").default;
85
101
  export var uuid: import("#UUIDType").default;
86
- export { _a as enum, _b as function };
102
+ export var loose: typeof schema;
103
+ export var strict: typeof schema;
104
+ export { _a as enum, _b as function, _c as null };
87
105
  }
88
106
  export default schema;
89
107
  //# sourceMappingURL=index.d.ts.map