File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,8 @@ const typify = (type) => {
101
101
return 'Buffer'
102
102
case 'buffer[]' :
103
103
return 'Buffer[]'
104
+ case 'voidfunction' :
105
+ return '(() => void)'
104
106
case 'promise' :
105
107
if ( innerType ) {
106
108
return `Promise<${ innerType } >`
Original file line number Diff line number Diff line change @@ -61,6 +61,10 @@ describe('utils', () => {
61
61
expect ( utils . typify ( 'Number' ) ) . to . equal ( 'number' )
62
62
} )
63
63
64
+ it ( 'should correctly convert a void function' , ( ) => {
65
+ expect ( utils . typify ( 'VoidFunction' ) ) . to . equal ( '(() => void)' )
66
+ } )
67
+
64
68
it ( 'should lower case known array types' , ( ) => {
65
69
expect ( utils . typify ( 'String[]' ) ) . to . equal ( 'string[]' )
66
70
expect ( utils . typify ( 'Number[]' ) ) . to . equal ( 'number[]' )
You can’t perform that action at this time.
0 commit comments