arktype 2.1.18 → 2.1.19

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.
@@ -16,7 +16,7 @@ export type inferDefinition<def, $, args> = [
16
16
  export type validateDefinition<def, $, args> = null extends undefined ? ErrorMessage<`'strict' or 'strictNullChecks' must be set to true in your tsconfig's 'compilerOptions'`> : [def] extends [anyOrNever] ? def : def extends OptionalPropertyDefinition ? ErrorMessage<shallowOptionalMessage> : isDefaultable<def, $, args> extends true ? ErrorMessage<shallowDefaultableMessage> : validateInnerDefinition<def, $, args>;
17
17
  export type validateInnerDefinition<def, $, args> = [
18
18
  def
19
- ] extends [Terminal] ? def : def extends string ? validateString<def, $, args> : def extends array ? validateTuple<def, $, args> : def extends BadDefinitionType ? ErrorMessage<writeBadDefinitionTypeMessage<objectKindOrDomainOf<def>>> : unknown extends def ? BaseCompletions<$, args> | {} : RegExp extends def ? def : validateObjectLiteral<def, $, args>;
19
+ ] extends [Terminal] ? def : def extends string ? validateString<def, $, args> : def extends BadDefinitionType ? ErrorMessage<writeBadDefinitionTypeMessage<objectKindOrDomainOf<def>>> : unknown extends def ? BaseCompletions<$, args> | {} : def extends readonly unknown[] ? validateTuple<def, $, args> : validateObjectLiteral<def, $, args>;
20
20
  export declare const parseTuple: (def: array, ctx: BaseParseContext) => BaseRoot;
21
21
  export type validateTuple<def extends array, $, args> = maybeValidateTupleExpression<def, $, args> extends infer result ? result extends null ? validateTupleLiteral<def, $, args> : result : never;
22
22
  export type inferTuple<def extends array, $, args> = def extends TupleExpression ? inferTupleExpression<def, $, args> : inferTupleLiteral<def, $, args>;
@@ -33,7 +33,7 @@ type declarationMismatch<def, declared, $, args> = {
33
33
  declared: declared;
34
34
  inferred: inferDefinition<def, $, args>;
35
35
  };
36
- type Terminal = type.cast<unknown> | Fn;
36
+ type Terminal = type.cast<unknown> | Fn | RegExp;
37
37
  export type ThunkCast<t = unknown> = () => type.cast<t>;
38
38
  type BadDefinitionType = Exclude<Primitive, string>;
39
39
  export declare const writeBadDefinitionTypeMessage: <actual extends string>(actual: actual) => writeBadDefinitionTypeMessage<actual>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "arktype",
3
3
  "description": "TypeScript's 1:1 validator, optimized from editor to runtime",
4
- "version": "2.1.18",
4
+ "version": "2.1.19",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -34,8 +34,8 @@
34
34
  "out"
35
35
  ],
36
36
  "dependencies": {
37
- "@ark/util": "0.45.8",
38
- "@ark/schema": "0.45.8"
37
+ "@ark/util": "0.45.9",
38
+ "@ark/schema": "0.45.9"
39
39
  },
40
40
  "publishConfig": {
41
41
  "access": "public"