Comparing version 2.0.0-rc.27 to 2.0.0-rc.28
import type { ArkError, ArkErrors, Morph } from "@ark/schema"; | ||
import type { anyOrNever, array, Brand, equals, Hkt, intersectArrays, isSafelyMappable, Primitive, show } from "@ark/util"; | ||
import { type anyOrNever, type array, type Brand, type equals, type Hkt, type intersectArrays, type isSafelyMappable, type Primitive, type show } from "@ark/util"; | ||
import type { arkPrototypes } from "./keywords/constructors.ts"; | ||
@@ -56,5 +56,5 @@ import type { type } from "./keywords/keywords.ts"; | ||
export type inferMorphOut<morph extends Morph> = Exclude<ReturnType<morph>, ArkError | ArkErrors>; | ||
declare const morphOutSymbol: unique symbol; | ||
declare const isMorphOutKey: " isMorphOut"; | ||
export interface Out<o = any> { | ||
[morphOutSymbol]: true; | ||
[isMorphOutKey]: true; | ||
t: o; | ||
@@ -67,5 +67,5 @@ introspectable: boolean; | ||
export type InferredMorph<i = any, o extends Out = Out> = (In: i) => o; | ||
declare const defaultsTo: unique symbol; | ||
declare const defaultsToKey: " defaultsTo"; | ||
export type Default<t = unknown, v = unknown> = { | ||
[defaultsTo]: [t, v]; | ||
[defaultsToKey]: [t, v]; | ||
}; | ||
@@ -72,0 +72,0 @@ export type withDefault<t, v, undistributed = t> = t extends InferredMorph ? addDefaultToMorph<t, v> : Default<Exclude<undistributed, InferredMorph>, v>; |
@@ -1,1 +0,3 @@ | ||
export {}; | ||
import { noSuggest } from "@ark/util"; | ||
const isMorphOutKey = noSuggest("isMorphOut"); | ||
const defaultsToKey = noSuggest("defaultsTo"); |
{ | ||
"name": "arktype", | ||
"description": "TypeScript's 1:1 validator, optimized from editor to runtime", | ||
"version": "2.0.0-rc.27", | ||
"version": "2.0.0-rc.28", | ||
"license": "MIT", | ||
@@ -37,4 +37,4 @@ "author": { | ||
"dependencies": { | ||
"@ark/util": "0.27.0", | ||
"@ark/schema": "0.27.0" | ||
"@ark/util": "0.28.0", | ||
"@ark/schema": "0.28.0" | ||
}, | ||
@@ -41,0 +41,0 @@ "publishConfig": { |
223218
4255
+ Added@ark/schema@0.28.0(transitive)
+ Added@ark/util@0.28.0(transitive)
- Removed@ark/schema@0.27.0(transitive)
- Removed@ark/util@0.27.0(transitive)
Updated@ark/schema@0.28.0
Updated@ark/util@0.28.0