20 lines
460 B
Plaintext
20 lines
460 B
Plaintext
|
=== tests/cases/compiler/genericArrayPropertyAssignment.ts ===
|
||
|
function isEmpty(list: {length:number;})
|
||
|
>isEmpty : (list: { length: number; }) => boolean
|
||
|
>list : { length: number; }
|
||
|
>length : number
|
||
|
{
|
||
|
return list.length ===0;
|
||
|
>list.length ===0 : boolean
|
||
|
>list.length : number
|
||
|
>list : { length: number; }
|
||
|
>length : number
|
||
|
}
|
||
|
|
||
|
isEmpty([]); // error
|
||
|
>isEmpty([]) : boolean
|
||
|
>isEmpty : (list: { length: number; }) => boolean
|
||
|
>[] : undefined[]
|
||
|
|
||
|
|