Files
website/node_modules/unherit/index.d.ts
2024-05-06 17:15:30 -04:00

14 lines
321 B
TypeScript

/**
* Create a subclass that can be modified without affecting the super class.
*
* @template {{prototype: object, new (...args: any[]): any}} Class
* @param {Class} Super
* @return {Class}
*/
export function unherit<
Class extends {
new (...args: any[]): any
prototype: object
}
>(Super: Class): Class