mirror of
https://github.com/BetterCorp/BetterFrame.git
synced 2026-05-26 16:56:33 +00:00
19 lines
No EOL
577 B
JavaScript
19 lines
No EOL
577 B
JavaScript
import { BaseSchema } from "./base.js";
|
|
import { ISSUE_CODES } from "../issue-codes.js";
|
|
import { describeType } from "../util.js";
|
|
export class NeverSchema extends BaseSchema {
|
|
_validate(input, ctx) {
|
|
ctx.issues.push({
|
|
code: ISSUE_CODES.INVALID_TYPE,
|
|
message: `Expected never (no value is valid)`,
|
|
path: [...ctx.path],
|
|
expected: "never",
|
|
received: describeType(input),
|
|
});
|
|
return undefined;
|
|
}
|
|
_toNode() {
|
|
return { kind: "never" };
|
|
}
|
|
}
|
|
//# sourceMappingURL=never.js.map
|