-
-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
15251e2
commit 65a6bba
Showing
8 changed files
with
36 additions
and
17 deletions.
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
19 changes: 19 additions & 0 deletions
19
crates/stc_ts_file_analyzer/tests/pass-only/types/keyof/3.ts
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,19 @@ | ||
// @strictNullChecks: true | ||
// @declaration: true | ||
|
||
class Shape { | ||
name: string; | ||
width: number; | ||
height: number; | ||
visible: boolean; | ||
} | ||
|
||
function getProperty<T, K extends keyof T>(obj: T, key: K) { | ||
return obj[key]; | ||
} | ||
|
||
function f33<S extends Shape, K extends keyof S>(shape: S, key: K) { | ||
let name = getProperty(shape, "name"); | ||
let prop = getProperty(shape, key); | ||
return prop; | ||
} |
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
12 changes: 0 additions & 12 deletions
12
...er/tests/conformance/jsdoc/typeParameterExtendsUnionConstraintDistributed.error-diff.json
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...r/tests/conformance/jsdoc/typeParameterExtendsUnionConstraintDistributed.stats.rust-debug
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Stats { | ||
required_error: 0, | ||
matched_error: 0, | ||
extra_error: 1, | ||
extra_error: 0, | ||
panic: 0, | ||
} |
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
2 changes: 1 addition & 1 deletion
2
.../stc_ts_type_checker/tests/conformance/types/keyof/keyofAndIndexedAccess.stats.rust-debug
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Stats { | ||
required_error: 0, | ||
matched_error: 5, | ||
extra_error: 22, | ||
extra_error: 21, | ||
panic: 0, | ||
} |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Stats { | ||
required_error: 3501, | ||
matched_error: 6534, | ||
extra_error: 765, | ||
extra_error: 763, | ||
panic: 73, | ||
} |