How to calculate focus for bokeh

Do you have TypeScript definitions for DoF?