TypeScript/tests/baselines/reference/errorOnContextuallyTypedReturnType.js

9 lines
336 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
//// [errorOnContextuallyTypedReturnType.ts]
var n1: () => boolean = function () { }; // expect an error here
var n2: () => boolean = function ():boolean { }; // expect an error here
//// [errorOnContextuallyTypedReturnType.js]
var n1 = function () { }; // expect an error here
var n2 = function () { }; // expect an error here