Skip to content

Commit bb0f120

Browse files
Accepted baselines.
1 parent 2a28805 commit bb0f120

8 files changed

+69
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
tests/cases/compiler/functionAssignabilityWithArrayLike01.ts(2,7): error TS2322: Type '() => void' is not assignable to type 'ArrayLike<any>'.
2+
Index signature is missing in type '() => void'.
3+
4+
5+
==== tests/cases/compiler/functionAssignabilityWithArrayLike01.ts (1 errors) ====
6+
function func() {}
7+
const array: ArrayLike<any> = func;
8+
~~~~~
9+
!!! error TS2322: Type '() => void' is not assignable to type 'ArrayLike<any>'.
10+
!!! error TS2322: Index signature is missing in type '() => void'.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//// [functionAssignabilityWithArrayLike01.ts]
2+
function func() {}
3+
const array: ArrayLike<any> = func;
4+
5+
//// [functionAssignabilityWithArrayLike01.js]
6+
function func() { }
7+
var array = func;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
=== tests/cases/compiler/functionAssignabilityWithArrayLike01.ts ===
2+
function func() {}
3+
>func : Symbol(func, Decl(functionAssignabilityWithArrayLike01.ts, 0, 0))
4+
5+
const array: ArrayLike<any> = func;
6+
>array : Symbol(array, Decl(functionAssignabilityWithArrayLike01.ts, 1, 5))
7+
>ArrayLike : Symbol(ArrayLike, Decl(lib.es5.d.ts, --, --))
8+
>func : Symbol(func, Decl(functionAssignabilityWithArrayLike01.ts, 0, 0))
9+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
=== tests/cases/compiler/functionAssignabilityWithArrayLike01.ts ===
2+
function func() {}
3+
>func : () => void
4+
5+
const array: ArrayLike<any> = func;
6+
>array : ArrayLike<any>
7+
>func : () => void
8+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
tests/cases/compiler/functionAssignabilityWithArrayLike01.ts(2,7): error TS2322: Type '() => void' is not assignable to type 'ArrayLike<any>'.
2+
Index signature is missing in type '() => void'.
3+
4+
5+
==== tests/cases/compiler/functionAssignabilityWithArrayLike01.ts (1 errors) ====
6+
function func() {}
7+
const array: ArrayLike<any> = func;
8+
~~~~~
9+
!!! error TS2322: Type '() => void' is not assignable to type 'ArrayLike<any>'.
10+
!!! error TS2322: Index signature is missing in type '() => void'.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//// [functionAssignabilityWithArrayLike01.ts]
2+
function func() {}
3+
const array: ArrayLike<any> = func;
4+
5+
//// [functionAssignabilityWithArrayLike01.js]
6+
"use strict";
7+
function func() { }
8+
var array = func;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
=== tests/cases/compiler/functionAssignabilityWithArrayLike01.ts ===
2+
function func() {}
3+
>func : Symbol(func, Decl(functionAssignabilityWithArrayLike01.ts, 0, 0))
4+
5+
const array: ArrayLike<any> = func;
6+
>array : Symbol(array, Decl(functionAssignabilityWithArrayLike01.ts, 1, 5))
7+
>ArrayLike : Symbol(ArrayLike, Decl(lib.es5.d.ts, --, --))
8+
>func : Symbol(func, Decl(functionAssignabilityWithArrayLike01.ts, 0, 0))
9+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
=== tests/cases/compiler/functionAssignabilityWithArrayLike01.ts ===
2+
function func() {}
3+
>func : () => void
4+
5+
const array: ArrayLike<any> = func;
6+
>array : ArrayLike<any>
7+
>func : () => void
8+

0 commit comments

Comments
 (0)