( value: object | symbol | string )
| 151 | |
| 152 | // named by path, since runtime state differs between builds |
| 153 | export const runtimeKeyOf = ( |
| 154 | value: object | symbol | string |
| 155 | ): string | undefined => |
| 156 | typeof value === "string" ? undefined : ( |
| 157 | (runtimePathsByValue.get(value) ?? |
| 158 | (( |
| 159 | typeof value === "function" && |
| 160 | Reflect.get(globalThis, functionNameOf(value)) === value |
| 161 | ) ? |
| 162 | `globalThis.${functionNameOf(value)}` |
| 163 | : undefined)) |
| 164 | ) |
| 165 | |
| 166 | // arktype calls a default's thunk each time it writes the schema |
| 167 | export const assertBakeableJsonSchema = (root: BaseRoot): void => { |
no test coverage detected