mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
19 lines
352 B
TypeScript
19 lines
352 B
TypeScript
//// [tests/cases/compiler/genericArrayPropertyAssignment.ts] ////
|
|
|
|
//// [genericArrayPropertyAssignment.ts]
|
|
function isEmpty(list: {length:number;})
|
|
{
|
|
return list.length ===0;
|
|
}
|
|
|
|
isEmpty([]); // error
|
|
|
|
|
|
|
|
//// [genericArrayPropertyAssignment.js]
|
|
"use strict";
|
|
function isEmpty(list) {
|
|
return list.length === 0;
|
|
}
|
|
isEmpty([]); // error
|