File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ export class Maybe<T> implements IMaybe<T> {
6666 : pattern . some ( this . value as NonNullable < T > )
6767 }
6868
69- public toArray ( ) {
69+ public toArray ( ) : ReadonlyArray < T > {
7070 return this . isNone ( )
7171 ? [ ]
7272 : Array . isArray ( this . value )
Original file line number Diff line number Diff line change @@ -85,19 +85,19 @@ describe('result', () => {
8585 } )
8686
8787 it ( 'should return empty maybe when "maybeOk" is invoked' , ( ) => {
88- const _sut = fail ( 'Test' )
88+ const sut = fail < string , string > ( 'Test' )
8989 . maybeOk ( )
9090 . valueOr ( 'Some Other1' )
9191
92- expect ( _sut ) . toEqual ( 'Some Other1' )
92+ expect ( sut ) . toEqual ( 'Some Other1' )
9393 } )
9494
9595 it ( 'should return fail object when "maybeFail" is invoked' , ( ) => {
96- const _sut = fail ( 'Test' )
96+ const sut = fail < string , string > ( 'Test' )
9797 . maybeFail ( )
9898 . valueOr ( 'Some Other2' )
9999
100- expect ( _sut ) . toEqual ( 'Test' )
100+ expect ( sut ) . toEqual ( 'Test' )
101101 } )
102102
103103 it ( 'should throw an exception on "unwrap"' , ( ) => {
You can’t perform that action at this time.
0 commit comments