We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 191e7da commit 628a7caCopy full SHA for 628a7ca
4 files changed
test/programs/string-literals-inline/main.ts
@@ -1,3 +1,4 @@
1
class MyObject {
2
foo: "ok" | "fail" | "abort";
3
+ bar: "ok" | "fail" | "abort" | string;
4
}
test/programs/string-literals-inline/schema.json
@@ -8,10 +8,14 @@
8
"fail",
9
"ok"
10
]
11
+ },
12
+ "bar": {
13
+ "type": "string"
14
15
},
16
"required": [
- "foo"
17
+ "foo",
18
+ "bar"
19
],
20
"$schema": "http://json-schema.org/draft-04/schema#"
21
test/programs/string-literals/main.ts
@@ -2,4 +2,5 @@ type result = "ok" | "fail" | "abort";
foo: result;
5
+ bar: result | string;
6
test/programs/string-literals/schema.json
@@ -3,10 +3,14 @@
"properties": {
"foo": {
"$ref": "#/definitions/result"
7
"definitions": {
"result": {
0 commit comments