kjelsrud.dev/node_modules/unherit/index.d.ts

14 lines
321 B
TypeScript
Raw Normal View History

2023-07-19 21:31:30 +02:00
/**
* 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