TypeScript/tests/cases
Sheetal Nandi 9d31631fd7 Test cases of function infering return type of functions
if f is a contextually typed function expression (section 4.9.3), the inferred return type is the union type (section 3.3.4) of the types of the return statement expressions in the function body, ignoring return statements with no expressions.
Otherwise, the inferred return type is the first of the types of the return statement expressions in the function body that is a supertype (section 3.8.3) of each of the others, ignoring return statements with no expressions. A compile-time error occurs if no return statement expression has a type that is a supertype of each of the others.
2014-11-04 16:40:56 -08:00
..
compiler add test for const enum that is initialized with enum member defined above 2014-11-04 12:13:19 -08:00
conformance Test cases of function infering return type of functions 2014-11-04 16:40:56 -08:00
fourslash Merge branch 'master' into templates 2014-10-28 19:06:07 -07:00
fourslash_old Implement getNameOrDottedNameSpan for new compiler 2014-10-20 23:34:43 -07:00
project Switch to createCompilerDiagnostic for an invalid root file 2014-09-17 10:44:03 -07:00
projects
unittests/services Address code review 2014-10-20 14:39:31 -07:00