© 2026 Hedgehog Software, LLC
type.validate
type.validate<def, scope.t>
import { scope, type } from 'arktype' const baseScope = scope({ 'id': 'string' }) type $ = typeof baseScope.t function myType<const def>(def: type.validate<def, $>): type.infer<def, $> { return baseScope.type(def) } myType({ x: 'id' }) function myScopeWithExport<const def>(def: scope.validate<def>): scope.infer<def> { return scope({ ...baseScope.export(), ...def } as any) as any } myScopeWithExport({ x: 'id' }) function myScopeWithImport<const def>(def: scope.validate<def>): scope.infer<def> { return scope({ ...baseScope.import(), ...def } as any) as any } myScopeWithImport({ x: 'id' })