• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

whiteand / ts-quartet / 14367155701

09 Apr 2025 09:16PM UTC coverage: 90.893% (-5.7%) from 96.64%
14367155701

Pull #9

github

whiteand
fix: unified errors
Pull Request #9: Standard Compatibility

461 of 481 branches covered (95.84%)

Branch coverage included in aggregate %.

31 of 167 new or added lines in 5 files covered. (18.56%)

1605 of 1792 relevant lines covered (89.56%)

72.1 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

73.91
/src/compilers/vCompiler/vCompileSchema.ts
1
import { Z } from "../../types";
2
import { CompilationResult, TSchema, Validator } from "../../types";
3
import { getValidatorFromSchema } from "./getValidatorFromSchema";
1✔
4
import { implStandard } from "../implStandard";
1✔
5

6
export function vCompileSchema<T = Z>(
1✔
7
  schema: TSchema
81✔
8
): CompilationResult<T, Z> {
81✔
9
  const explanations: Z[] = [];
81✔
10
  const validator = getValidatorFromSchema(schema, undefined) as Validator<T>;
81✔
11
  const res = Object.assign(validator, {
81✔
12
    explanations,
81✔
13
    schema,
81✔
14
    cast() {
81✔
15
      return this as Z;
×
16
    },
×
17
  }) as Z;
81✔
18
  res["~standard"] = implStandard(res, () => [
81✔
NEW
19
    {
×
NEW
20
      message: "invalid value",
×
NEW
21
      path: [],
×
NEW
22
    },
×
23
  ]);
81✔
24
  return res;
81✔
25
}
81✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc