-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Showing
4 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
tests/baselines/reference/nonPrimitiveRhsSideOfInExpression.js
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,17 @@ | ||
//// [nonPrimitiveRhsSideOfInExpression.ts] | ||
let o: object = {}; | ||
|
||
function f(): object { | ||
return {}; | ||
} | ||
|
||
const b1 = "foo" in o; | ||
const b2 = "bar" in f(); | ||
|
||
//// [nonPrimitiveRhsSideOfInExpression.js] | ||
var o = {}; | ||
function f() { | ||
return {}; | ||
} | ||
var b1 = "foo" in o; | ||
var b2 = "bar" in f(); |
18 changes: 18 additions & 0 deletions
18
tests/baselines/reference/nonPrimitiveRhsSideOfInExpression.symbols
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,18 @@ | ||
=== tests/cases/conformance/types/nonPrimitive/nonPrimitiveRhsSideOfInExpression.ts === | ||
let o: object = {}; | ||
>o : Symbol(o, Decl(nonPrimitiveRhsSideOfInExpression.ts, 0, 3)) | ||
|
||
function f(): object { | ||
>f : Symbol(f, Decl(nonPrimitiveRhsSideOfInExpression.ts, 0, 19)) | ||
|
||
return {}; | ||
} | ||
|
||
const b1 = "foo" in o; | ||
>b1 : Symbol(b1, Decl(nonPrimitiveRhsSideOfInExpression.ts, 6, 5)) | ||
>o : Symbol(o, Decl(nonPrimitiveRhsSideOfInExpression.ts, 0, 3)) | ||
|
||
const b2 = "bar" in f(); | ||
>b2 : Symbol(b2, Decl(nonPrimitiveRhsSideOfInExpression.ts, 7, 5)) | ||
>f : Symbol(f, Decl(nonPrimitiveRhsSideOfInExpression.ts, 0, 19)) | ||
|
25 changes: 25 additions & 0 deletions
25
tests/baselines/reference/nonPrimitiveRhsSideOfInExpression.types
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,25 @@ | ||
=== tests/cases/conformance/types/nonPrimitive/nonPrimitiveRhsSideOfInExpression.ts === | ||
let o: object = {}; | ||
>o : object | ||
>{} : {} | ||
|
||
function f(): object { | ||
>f : () => object | ||
|
||
return {}; | ||
>{} : {} | ||
} | ||
|
||
const b1 = "foo" in o; | ||
>b1 : boolean | ||
>"foo" in o : boolean | ||
>"foo" : "foo" | ||
>o : object | ||
|
||
const b2 = "bar" in f(); | ||
>b2 : boolean | ||
>"bar" in f() : boolean | ||
>"bar" : "bar" | ||
>f() : object | ||
>f : () => object | ||
|
8 changes: 8 additions & 0 deletions
8
tests/cases/conformance/types/nonPrimitive/nonPrimitiveRhsSideOfInExpression.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,8 @@ | ||
let o: object = {}; | ||
|
||
function f(): object { | ||
return {}; | ||
} | ||
|
||
const b1 = "foo" in o; | ||
const b2 = "bar" in f(); |