generated from json-schema-org/repo-template
-
-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathtypes.ts
62 lines (53 loc) · 1.15 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import { InvalidSchemaError } from "@hyperjump/json-schema/draft-2020-12";
export type ChapterStep = {
title: string;
fileName: string;
fullPath: string;
nextStepFullPath?: string;
previousStepFullPath?: string;
};
export type Chapter = {
title: string;
folderName: string;
steps: ChapterStep[];
};
export type ContentOutline = Chapter[];
export type Metadata = {
title: string;
description: string;
keywords: string;
};
export type TestCase = {
input: Object;
expected: Boolean;
};
// type schemaSafeError = {
// instanceLocation: string;
// keywordLocation: string;
// };
export type TestCaseResult = TestCase & {
actual: Boolean;
errors?: string | undefined;
passed: Boolean;
};
export type CodeFile = {
code: Object;
testCases: TestCase[];
solution: Object;
expectedAnnotations?: string[];
externalSchema?: any;
};
export type CodeFileExports = {
exports: CodeFile;
};
export type OutputResult = {
validityStatus:
| "valid"
| "invalid"
| "neutral"
| "syntaxError"
| "invalidSchema";
testCaseResults?: TestCaseResult[];
totalTestCases?: number;
errors?: InvalidSchemaError | string;
};