Skip to content

Commit 637d9fb

Browse files
committed
types
1 parent 602bcf4 commit 637d9fb

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
"@types/glob": "7.1.3",
4949
"@types/js-yaml": "3.12.5",
5050
"@types/lodash": "^4.14.202",
51-
"@types/node": "^20.0.0",
5251
"cheerio": "^1.0.0",
5352
"dedent": "^1.5.1",
5453
"eslint-plugin-markdown": "^4.0.1",
@@ -76,6 +75,7 @@
7675
"@types/js-yaml": "3.12.5",
7776
"@types/minimatch": "3.0.3",
7877
"@types/ms": "2.1.0",
78+
"@types/node": "^20.9.4",
7979
"@vscode/test-electron": "^2.3.8",
8080
"arktype": "^2.1.20",
8181
"eslint": "^8.57.0",

pnpm-lock.yaml

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/standard-schema/errors.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
import type {StandardSchemaV1} from './contract'
22
import {looksLikeStandardSchemaFailure} from './utils'
33

4-
export const prettifyStandardSchemaError = (error: unknown): string | null => {
4+
export const prettifyErrorIfStandardSchemaFailure = (error: unknown): string | null => {
55
if (!looksLikeStandardSchemaFailure(error)) return null
6+
return prettifyStandardSchemaError(error)
7+
}
68

9+
export const prettifyStandardSchemaError = (error: StandardSchemaV1.FailureResult): string => {
710
const issues = [...error.issues]
811
.map(issue => {
912
const path = issue.path || []

0 commit comments

Comments
 (0)