Revert "fix(compiler): Generates function expressions as returning any (#9980)"

This reverts commit eb5763c23f.
This commit is contained in:
Chuck Jazdzewski
2016-07-13 10:40:16 -07:00
parent 34feecf60e
commit 9229bbbc80
3 changed files with 4 additions and 22 deletions

View File

@ -143,11 +143,11 @@ export function main() {
});
it('should support function expressions', () => {
expect(emitStmt(o.fn([], []).toStmt())).toEqual(['():any => {', '};'].join('\n'));
expect(emitStmt(o.fn([], []).toStmt())).toEqual(['():void => {', '};'].join('\n'));
expect(emitStmt(o.fn([], [new o.ReturnStatement(o.literal(1))], o.INT_TYPE).toStmt()))
.toEqual(['():number => {', ' return 1;\n};'].join('\n'));
expect(emitStmt(o.fn([new o.FnParam('param1', o.INT_TYPE)], []).toStmt())).toEqual([
'(param1:number):any => {', '};'
'(param1:number):void => {', '};'
].join('\n'));
});