@@ -3,7 +3,7 @@ import type { IsEqual, IsExactlyAnyOrUnknown, Simplify, ValueOf } from '../../sh
33import { implStepPlugin } from '../../core'
44
55declare namespace Internal {
6- export type Struct = Record < PropertyKey , Use < Valchecker > | [ optional : Use < Valchecker > ] >
6+ export type Struct = Record < string , Use < Valchecker > | [ optional : Use < Valchecker > ] >
77
88 export type Async <
99 S extends Struct ,
@@ -29,7 +29,7 @@ declare namespace Internal {
2929
3030 export type Issue < S extends Struct = never >
3131 = | ExecutionIssue < 'strictObject:expected_object' , { value : unknown } >
32- | ExecutionIssue < 'strictObject:unexpected_keys' , { value : unknown , keys : PropertyKey [ ] } >
32+ | ExecutionIssue < 'strictObject:unexpected_keys' , { value : unknown , keys : string [ ] } >
3333 | (
3434 IsEqual < Struct , never > extends true
3535 ? never
@@ -103,9 +103,9 @@ export const strictObject = implStepPlugin<PluginDef>({
103103 params : [ struct , message ] ,
104104 } ) => {
105105 // Pre-compute metadata for each property to avoid repeated lookups
106- const keys = Reflect . ownKeys ( struct )
106+ const keys = Object . keys ( struct )
107107 const keysLen = keys . length
108- const propsMeta : Array < { key : string | symbol , isOptional : boolean , schema : Use < Valchecker > } > = [ ]
108+ const propsMeta : Array < { key : string , isOptional : boolean , schema : Use < Valchecker > } > = [ ]
109109
110110 for ( let i = 0 ; i < keysLen ; i ++ ) {
111111 const key = keys [ i ] !
@@ -131,9 +131,9 @@ export const strictObject = implStepPlugin<PluginDef>({
131131 } )
132132 }
133133
134- const ownKeysSet = new Set ( Reflect . ownKeys ( value ) )
134+ const ownKeysSet = new Set ( Object . keys ( value ) )
135135 const issues : ExecutionIssue < any , any > [ ] = [ ]
136- const output : Record < PropertyKey , any > = { }
136+ const output : Record < string , any > = { }
137137
138138 // Inline processPropResult for better performance
139139 // First pass: process synchronously until we hit async
0 commit comments