-
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
2b10784
commit 080b391
Showing
17 changed files
with
373 additions
and
38 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
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
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 |
---|---|---|
@@ -1,28 +1,16 @@ | ||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(6,5): error TS2322: Type 'number' is not assignable to type 'ArrayConstructor'. | ||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(6,22): error TS1005: '=' expected. | ||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(6,30): error TS1109: Expression expected. | ||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(7,5): error TS2322: Type 'number' is not assignable to type 'ArrayConstructor'. | ||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(7,22): error TS1005: '=' expected. | ||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(7,32): error TS1109: Expression expected. | ||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(6,30): error TS1005: '(' expected. | ||
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(7,32): error TS1005: '(' expected. | ||
|
||
|
||
==== tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts (6 errors) ==== | ||
==== tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts (2 errors) ==== | ||
// array type cannot use typeof. | ||
|
||
var x = 1; | ||
var xs: typeof x[]; // Not an error. This is equivalent to Array<typeof x> | ||
var xs2: typeof Array; | ||
var xs3: typeof Array<number>; | ||
~~~ | ||
!!! error TS2322: Type 'number' is not assignable to type 'ArrayConstructor'. | ||
~ | ||
!!! error TS1005: '=' expected. | ||
~ | ||
!!! error TS1109: Expression expected. | ||
!!! error TS1005: '(' expected. | ||
var xs4: typeof Array<typeof x>; | ||
~~~ | ||
!!! error TS2322: Type 'number' is not assignable to type 'ArrayConstructor'. | ||
~ | ||
!!! error TS1005: '=' expected. | ||
~ | ||
!!! error TS1109: Expression expected. | ||
!!! error TS1005: '(' expected. |
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
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,13 +1,16 @@ | ||
tests/cases/conformance/parser/ecmascript5/ObjectTypes/parserObjectType5.ts(2,7): error TS2304: Cannot find name 'B'. | ||
tests/cases/conformance/parser/ecmascript5/ObjectTypes/parserObjectType5.ts(3,5): error TS2304: Cannot find name 'T'. | ||
tests/cases/conformance/parser/ecmascript5/ObjectTypes/parserObjectType5.ts(3,7): error TS1005: '(' expected. | ||
|
||
|
||
==== tests/cases/conformance/parser/ecmascript5/ObjectTypes/parserObjectType5.ts (2 errors) ==== | ||
==== tests/cases/conformance/parser/ecmascript5/ObjectTypes/parserObjectType5.ts (3 errors) ==== | ||
var v: { | ||
A: B | ||
~ | ||
!!! error TS2304: Cannot find name 'B'. | ||
<T>; | ||
~ | ||
!!! error TS2304: Cannot find name 'T'. | ||
~ | ||
!!! error TS1005: '(' expected. | ||
}; |
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,16 +1,13 @@ | ||
tests/cases/conformance/parser/ecmascript5/Types/parserTypeQuery8.ts(1,15): error TS2304: Cannot find name 'A'. | ||
tests/cases/conformance/parser/ecmascript5/Types/parserTypeQuery8.ts(1,16): error TS1005: '=' expected. | ||
tests/cases/conformance/parser/ecmascript5/Types/parserTypeQuery8.ts(1,17): error TS2304: Cannot find name 'B'. | ||
tests/cases/conformance/parser/ecmascript5/Types/parserTypeQuery8.ts(1,19): error TS1109: Expression expected. | ||
tests/cases/conformance/parser/ecmascript5/Types/parserTypeQuery8.ts(1,19): error TS1005: '(' expected. | ||
|
||
|
||
==== tests/cases/conformance/parser/ecmascript5/Types/parserTypeQuery8.ts (4 errors) ==== | ||
==== tests/cases/conformance/parser/ecmascript5/Types/parserTypeQuery8.ts (3 errors) ==== | ||
var v: typeof A<B> | ||
~ | ||
!!! error TS2304: Cannot find name 'A'. | ||
~ | ||
!!! error TS1005: '=' expected. | ||
~ | ||
!!! error TS2304: Cannot find name 'B'. | ||
|
||
!!! error TS1109: Expression expected. | ||
!!! error TS1005: '(' expected. |
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 |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
var v: typeof A<B> | ||
|
||
//// [parserTypeQuery8.js] | ||
var v = ; | ||
var v; |
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,36 @@ | ||
//// [typeCall.ts] | ||
type F1 = () => 1; | ||
type a = F1(); | ||
|
||
type F2 = (a: string) => 1; | ||
type b = F2('foo'); | ||
|
||
interface F3 { | ||
(): 1; | ||
(a: number): 2; | ||
(a: string): 3; | ||
} | ||
type c = F3(); | ||
type d = F3(123); | ||
type e = F3('foo'); | ||
|
||
declare function f4(a: string): 1; | ||
let a = 'foo'; | ||
type f = typeof f4(typeof a); | ||
|
||
type g = (() => 1)(); | ||
|
||
type Id = <T>(v: T) => T; | ||
type h = Id(123); | ||
|
||
type Wrap<T> = Id(T); | ||
type i = Wrap<123>; | ||
|
||
type F5 = () => () => { a: () => 1; }; | ||
type j = F5()()['a'](); | ||
|
||
type k = Id<string>('foo'); | ||
|
||
|
||
//// [typeCall.js] | ||
var a = 'foo'; |
Oops, something went wrong.