UNPKG

typeit

Version:

The most versatile animated typing utility on the planet.

6 lines (4 loc) 150 B
let handleFunctionalArg = <T>(arg: any | (() => T)): T => { return typeof arg === "function" ? arg() : arg; }; export default handleFunctionalArg;