Commit 21f1923
authored
Fix infer from usage prop assignment (#33088)
* Add test case
* Fix infer from usage property assignment
Property assignment and shorthand property assignment were incorrectly
treated differently; both have ObjectLiteralExpression as a parent, but
the code previously assumed that property assignments had
ObjectLiteralExpression as parent.parent.
Also make fourslash directives case insensitive and less whitespace
sensitive.
* Add "incorrect 3-slash" error to fourslash parsing.1 parent b4417da commit 21f1923
File tree
4 files changed
+35
-22
lines changed- src
- harness
- services/codefixes
- tests/cases/fourslash
4 files changed
+35
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
3281 | 3281 | | |
3282 | 3282 | | |
3283 | 3283 | | |
3284 | | - | |
| 3284 | + | |
3285 | 3285 | | |
3286 | 3286 | | |
3287 | 3287 | | |
| |||
3293 | 3293 | | |
3294 | 3294 | | |
3295 | 3295 | | |
| 3296 | + | |
3296 | 3297 | | |
3297 | 3298 | | |
3298 | 3299 | | |
| |||
3321 | 3322 | | |
3322 | 3323 | | |
3323 | 3324 | | |
| 3325 | + | |
3324 | 3326 | | |
3325 | 3327 | | |
3326 | 3328 | | |
| |||
3329 | 3331 | | |
3330 | 3332 | | |
3331 | 3333 | | |
| 3334 | + | |
| 3335 | + | |
| 3336 | + | |
3332 | 3337 | | |
3333 | 3338 | | |
3334 | 3339 | | |
3335 | 3340 | | |
3336 | | - | |
| 3341 | + | |
| 3342 | + | |
3337 | 3343 | | |
3338 | 3344 | | |
3339 | 3345 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
717 | 717 | | |
718 | 718 | | |
719 | 719 | | |
720 | | - | |
721 | | - | |
722 | | - | |
723 | | - | |
724 | | - | |
725 | | - | |
726 | | - | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
727 | 723 | | |
728 | 724 | | |
729 | 725 | | |
| |||
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | 8 | | |
12 | 9 | | |
13 | 10 | | |
| |||
16 | 13 | | |
17 | 14 | | |
18 | 15 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | 16 | | |
24 | 17 | | |
25 | 18 | | |
| |||
37 | 30 | | |
38 | 31 | | |
39 | 32 | | |
40 | | - | |
| 33 | + | |
0 commit comments