Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: failed to resolve type for typeof static class property (#1119)
- Loading branch information
1 parent
7fd7b36
commit dd13747
Showing
4 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class Foo { | ||
static bar = "foo" | ||
} | ||
|
||
export type MyType = typeof Foo.bar; |
10 changes: 10 additions & 0 deletions
10
test/valid-data/type-typeof-class-static-property/schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"$ref": "#/definitions/MyType", | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"definitions": { | ||
"MyType": { | ||
"const": "foo", | ||
"type": "string" | ||
} | ||
} | ||
} |