Interface IAnyFunction

'with' statement on steroids! This module exports a With function which makes code succint without any of the limitations that led to 'with' getting dropped from the JavaScript standard. In fact it leads to much more concision than the original 'with' and does not degrade performance, readability or code comprehension. It is based on Proxy.

Example

With(document.createElement('button'))[SET]({className: 'main', textContent: 'Wow'}).addEventListener('click', () => console.log('Wow!!'))(btn => document.body.append(btn))()
interface IAnyFunction ((...args) => any)
  • Parameters

    • Rest ...args: any

    Returns any