interface Constructor < T > { new ( ... args ) : T ; } export function extendsBuiltIn ( ) { return ( target ) => { return class extends target { constructor ( ... args ) { super ( args ) ; Object . setPrototypeOf ( this , target . prototype ) ; } } ; } ; }