11import { Ono } from "@jsdevtools/ono" ;
2- import { stripHash , toFileSystemPath } from "./url.js" ;
2+ import { getHash , stripHash , toFileSystemPath } from "./url.js" ;
33import type $RefParser from "../index.js" ;
44import type { ParserOptions } from "../index.js" ;
55import type { JSONSchema } from "../index.js" ;
@@ -121,10 +121,10 @@ export class UnmatchedResolverError extends JSONParserError {
121121}
122122
123123export class MissingPointerError extends JSONParserError {
124- code = "EUNMATCHEDRESOLVER " as JSONParserErrorType ;
124+ code = "EMISSINGPOINTER " as JSONParserErrorType ;
125125 name = "MissingPointerError" ;
126- constructor ( token : any , path : any ) {
127- super ( `Token "${ token } " does not exist.` , stripHash ( path ) ) ;
126+ constructor ( token : string , path : string ) {
127+ super ( `Missing $ref pointer " ${ getHash ( path ) } ". Token "${ token } " does not exist.` , stripHash ( path ) ) ;
128128 }
129129}
130130
@@ -139,7 +139,7 @@ export class TimeoutError extends JSONParserError {
139139export class InvalidPointerError extends JSONParserError {
140140 code = "EUNMATCHEDRESOLVER" as JSONParserErrorType ;
141141 name = "InvalidPointerError" ;
142- constructor ( pointer : any , path : any ) {
142+ constructor ( pointer : string , path : string ) {
143143 super ( `Invalid $ref pointer "${ pointer } ". Pointers must begin with "#/"` , stripHash ( path ) ) ;
144144 }
145145}
0 commit comments