-
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
1 parent
9b558f9
commit 134b341
Showing
17 changed files
with
154 additions
and
5 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
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
10 changes: 10 additions & 0 deletions
10
tests/baselines/reference/nonexistentPropertyAvailableOnPromisedType.errors.txt
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 @@ | ||
tests/cases/compiler/nonexistentPropertyAvailableOnPromisedType.ts(2,7): error TS2570: Property 'toLowerCase' does not exist on type 'Promise<string>'. Did you forget to use 'await'? | ||
|
||
|
||
==== tests/cases/compiler/nonexistentPropertyAvailableOnPromisedType.ts (1 errors) ==== | ||
function f(x: Promise<string>) { | ||
x.toLowerCase(); | ||
~~~~~~~~~~~ | ||
!!! error TS2570: Property 'toLowerCase' does not exist on type 'Promise<string>'. Did you forget to use 'await'? | ||
} | ||
|
10 changes: 10 additions & 0 deletions
10
tests/baselines/reference/nonexistentPropertyAvailableOnPromisedType.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,10 @@ | ||
//// [nonexistentPropertyAvailableOnPromisedType.ts] | ||
function f(x: Promise<string>) { | ||
x.toLowerCase(); | ||
} | ||
|
||
|
||
//// [nonexistentPropertyAvailableOnPromisedType.js] | ||
function f(x) { | ||
x.toLowerCase(); | ||
} |
10 changes: 10 additions & 0 deletions
10
tests/baselines/reference/nonexistentPropertyAvailableOnPromisedType.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,10 @@ | ||
=== tests/cases/compiler/nonexistentPropertyAvailableOnPromisedType.ts === | ||
function f(x: Promise<string>) { | ||
>f : Symbol(f, Decl(nonexistentPropertyAvailableOnPromisedType.ts, 0, 0)) | ||
>x : Symbol(x, Decl(nonexistentPropertyAvailableOnPromisedType.ts, 0, 11)) | ||
>Promise : Symbol(Promise, Decl(lib.d.ts, --, --)) | ||
|
||
x.toLowerCase(); | ||
>x : Symbol(x, Decl(nonexistentPropertyAvailableOnPromisedType.ts, 0, 11)) | ||
} | ||
|
13 changes: 13 additions & 0 deletions
13
tests/baselines/reference/nonexistentPropertyAvailableOnPromisedType.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,13 @@ | ||
=== tests/cases/compiler/nonexistentPropertyAvailableOnPromisedType.ts === | ||
function f(x: Promise<string>) { | ||
>f : (x: Promise<string>) => void | ||
>x : Promise<string> | ||
>Promise : Promise<T> | ||
|
||
x.toLowerCase(); | ||
>x.toLowerCase() : any | ||
>x.toLowerCase : any | ||
>x : Promise<string> | ||
>toLowerCase : any | ||
} | ||
|
12 changes: 12 additions & 0 deletions
12
tests/baselines/reference/nonexistentPropertyOnUnion.errors.txt
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,12 @@ | ||
tests/cases/compiler/nonexistentPropertyOnUnion.ts(2,7): error TS2339: Property 'toLowerCase' does not exist on type 'string | Promise<string>'. | ||
Property 'toLowerCase' does not exist on type 'Promise<string>'. | ||
|
||
|
||
==== tests/cases/compiler/nonexistentPropertyOnUnion.ts (1 errors) ==== | ||
function f(x: string | Promise<string>) { | ||
x.toLowerCase(); | ||
~~~~~~~~~~~ | ||
!!! error TS2339: Property 'toLowerCase' does not exist on type 'string | Promise<string>'. | ||
!!! error TS2339: Property 'toLowerCase' does not exist on type 'Promise<string>'. | ||
} | ||
|
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 @@ | ||
//// [nonexistentPropertyOnUnion.ts] | ||
function f(x: string | Promise<string>) { | ||
x.toLowerCase(); | ||
} | ||
|
||
|
||
//// [nonexistentPropertyOnUnion.js] | ||
function f(x) { | ||
x.toLowerCase(); | ||
} |
10 changes: 10 additions & 0 deletions
10
tests/baselines/reference/nonexistentPropertyOnUnion.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,10 @@ | ||
=== tests/cases/compiler/nonexistentPropertyOnUnion.ts === | ||
function f(x: string | Promise<string>) { | ||
>f : Symbol(f, Decl(nonexistentPropertyOnUnion.ts, 0, 0)) | ||
>x : Symbol(x, Decl(nonexistentPropertyOnUnion.ts, 0, 11)) | ||
>Promise : Symbol(Promise, Decl(lib.d.ts, --, --)) | ||
|
||
x.toLowerCase(); | ||
>x : Symbol(x, Decl(nonexistentPropertyOnUnion.ts, 0, 11)) | ||
} | ||
|
13 changes: 13 additions & 0 deletions
13
tests/baselines/reference/nonexistentPropertyOnUnion.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,13 @@ | ||
=== tests/cases/compiler/nonexistentPropertyOnUnion.ts === | ||
function f(x: string | Promise<string>) { | ||
>f : (x: string | Promise<string>) => void | ||
>x : string | Promise<string> | ||
>Promise : Promise<T> | ||
|
||
x.toLowerCase(); | ||
>x.toLowerCase() : any | ||
>x.toLowerCase : any | ||
>x : string | Promise<string> | ||
>toLowerCase : any | ||
} | ||
|
10 changes: 10 additions & 0 deletions
10
tests/baselines/reference/nonexistentPropertyUnavailableOnPromisedType.errors.txt
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 @@ | ||
tests/cases/compiler/nonexistentPropertyUnavailableOnPromisedType.ts(2,7): error TS2339: Property 'toLowerCase' does not exist on type 'Promise<number>'. | ||
|
||
|
||
==== tests/cases/compiler/nonexistentPropertyUnavailableOnPromisedType.ts (1 errors) ==== | ||
function f(x: Promise<number>) { | ||
x.toLowerCase(); | ||
~~~~~~~~~~~ | ||
!!! error TS2339: Property 'toLowerCase' does not exist on type 'Promise<number>'. | ||
} | ||
|
10 changes: 10 additions & 0 deletions
10
tests/baselines/reference/nonexistentPropertyUnavailableOnPromisedType.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,10 @@ | ||
//// [nonexistentPropertyUnavailableOnPromisedType.ts] | ||
function f(x: Promise<number>) { | ||
x.toLowerCase(); | ||
} | ||
|
||
|
||
//// [nonexistentPropertyUnavailableOnPromisedType.js] | ||
function f(x) { | ||
x.toLowerCase(); | ||
} |
10 changes: 10 additions & 0 deletions
10
tests/baselines/reference/nonexistentPropertyUnavailableOnPromisedType.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,10 @@ | ||
=== tests/cases/compiler/nonexistentPropertyUnavailableOnPromisedType.ts === | ||
function f(x: Promise<number>) { | ||
>f : Symbol(f, Decl(nonexistentPropertyUnavailableOnPromisedType.ts, 0, 0)) | ||
>x : Symbol(x, Decl(nonexistentPropertyUnavailableOnPromisedType.ts, 0, 11)) | ||
>Promise : Symbol(Promise, Decl(lib.d.ts, --, --)) | ||
|
||
x.toLowerCase(); | ||
>x : Symbol(x, Decl(nonexistentPropertyUnavailableOnPromisedType.ts, 0, 11)) | ||
} | ||
|
13 changes: 13 additions & 0 deletions
13
tests/baselines/reference/nonexistentPropertyUnavailableOnPromisedType.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,13 @@ | ||
=== tests/cases/compiler/nonexistentPropertyUnavailableOnPromisedType.ts === | ||
function f(x: Promise<number>) { | ||
>f : (x: Promise<number>) => void | ||
>x : Promise<number> | ||
>Promise : Promise<T> | ||
|
||
x.toLowerCase(); | ||
>x.toLowerCase() : any | ||
>x.toLowerCase : any | ||
>x : Promise<number> | ||
>toLowerCase : any | ||
} | ||
|
3 changes: 3 additions & 0 deletions
3
tests/cases/compiler/nonexistentPropertyAvailableOnPromisedType.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,3 @@ | ||
function f(x: Promise<string>) { | ||
x.toLowerCase(); | ||
} |
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,3 @@ | ||
function f(x: string | Promise<string>) { | ||
x.toLowerCase(); | ||
} |
3 changes: 3 additions & 0 deletions
3
tests/cases/compiler/nonexistentPropertyUnavailableOnPromisedType.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,3 @@ | ||
function f(x: Promise<number>) { | ||
x.toLowerCase(); | ||
} |