import { Task } from '@ts-task/task' ; function foo ( condition ) { if ( condition ) { return Task . resolve ( 9 ) ; } return Task . reject ( 'buu' ) ; } foo ; Task . resolve < number , string > ( 9 ) ; Task . reject < string , number > ( 'buu' ) ; function foo2 ( condition ) { if ( condition ) { return Task . resolve < number , string > ( 9 ) ; } return Task . reject < string , number > ( 'buu' ) ; } foo2 ; const bar = ( condition ) => condition ? Task . resolve ( 9 ) : Task . reject ( 'buu' ) ; bar ; const bar2 = ( condition ) => condition ? Task . resolve < number , string > ( 9 ) : Task . reject < string , number > ( 'buu' ) ; bar2 ;