The optional log function is called with 2 arguments, the message and the level (although the level is always 'warn'). The typing information only declares the 1st argument:
|
log?: (msg: string) => any; |
Therefore, the example pool from README.md won't compile in TypeScript:
log: (message, logLevel) => console.log(`${logLevel}: ${message}`),
The optional
logfunction is called with 2 arguments, the message and the level (although the level is always'warn'). The typing information only declares the 1st argument:tarn.js/lib/Pool.d.ts
Line 15 in 270a295
Therefore, the example pool from README.md won't compile in TypeScript: