Sample Page

This is an example page. It’s different from a blog post because it will stay in one place and will show up in your site navigation (in most themes). Most people start with an About page that introduces them to potential site visitors. It might say something like this:

Hi there! I’m a bike messenger by day, aspiring actor by night, and this is my website. I live in Los Angeles, have a great dog named Jack, and I like piƱa coladas. (And gettin’ caught in the rain.)

extender.ts

export type AbstractConstructor<T = object> = abstract new (...args: any[]) => T;

export type Constructor<T = object> = (new (...args: any[]) => T) & { prototype: T };

export type Statics<T> = {
    [P in keyof T]: T[P];
}

export function extender<
    BaseType extends AbstractConstructor,
    T1 extends Constructor,
    T2 extends Constructor | {} = {},
    T3 extends Constructor | {} = {},
    T4 extends Constructor | {} = {},
    T5 extends Constructor | {} = {},
    T6 extends Constructor | {} = {},
    T7 extends Constructor | {} = {},
    T8 extends Constructor | {} = {},
    T9 extends Constructor | {} = {},
    T10 extends Constructor | {} = {}
>(
    base: BaseType,
    mix1: T1,
    mix2?: T2,
    mix3?: T3,
    mix4?: T4,
    mix5?: T5,
    mix6?: T6,
    mix7?: T7,
    mix8?: T8,
    mix9?: T9,
    mix10?: T10
):
    (BaseType extends AbstractConstructor ? Statics<BaseType> : {}) &
    (T1 extends Constructor ? Statics<T1> : {}) &
    (T2 extends Constructor ? Statics<T2> : {}) &
    (T3 extends Constructor ? Statics<T3> : {}) &
    (T4 extends Constructor ? Statics<T4> : {}) &
    (T5 extends Constructor ? Statics<T5> : {}) &
    (T6 extends Constructor ? Statics<T6> : {}) &
    (T7 extends Constructor ? Statics<T7> : {}) &
    (T8 extends Constructor ? Statics<T8> : {}) &
    (T9 extends Constructor ? Statics<T9> : {}) &
    (T10 extends Constructor ? Statics<T10> : {}) &
    (new (...args: BaseType extends AbstractConstructor ? ConstructorParameters<BaseType> : never[]) =>
        (BaseType extends AbstractConstructor ? InstanceType<BaseType> : BaseType) &
        (T1 extends Constructor ? InstanceType<T1> : T1) &
        (T2 extends Constructor ? InstanceType<T2> : T2) &
        (T3 extends Constructor ? InstanceType<T3> : T3) &
        (T4 extends Constructor ? InstanceType<T4> : T4) &
        (T5 extends Constructor ? InstanceType<T5> : T5) &
        (T6 extends Constructor ? InstanceType<T6> : T6) &
        (T7 extends Constructor ? InstanceType<T7> : T7) &
        (T8 extends Constructor ? InstanceType<T8> : T8) &
        (T9 extends Constructor ? InstanceType<T9> : T9) &
        (T10 extends Constructor ? InstanceType<T10> : T10)
    ) {
    return ([mix1, mix2, mix3, mix4, mix5, mix6, mix7, mix8, mix9, mix10].filter(mix => !!mix) as (T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8 | T9 | T10)[]).reduce((BaseClass: any, SourceClass: any) => {
        const name = SourceClass.name as string;
        return ([{
            [name]: class extends BaseClass {
                constructor(...args: any[]) {
                    super(...args);
                    const source = new SourceClass();
                    const target = this;
                    Object.getOwnPropertyNames(source).forEach(name => {
                        if (target[name] !== undefined)
                            return;
                        try { target[name] = source[name]; } catch (ex: any) { /*silent*/ }
                    });
                    return this;
                }
            }
        }].map(Class => {
            Object.defineProperty(Class[name], 'name', { value: name });
            Object.defineProperty(Class[name].constructor, 'name', { value: name });
            Object.getOwnPropertyNames(SourceClass.prototype).filter(el => el != 'constructor').forEach(property => {
                if (Class[name].prototype[property])
                    return; // do not overwrite existing properties
                if (typeof SourceClass.prototype[property] == 'function') {
                    Class[name].prototype[property] = SourceClass.prototype[property];
                } else if (SourceClass.prototype.__lookupSetter__ && SourceClass.prototype.__lookupGetter__) {
                    let [setter, getter] = [SourceClass.prototype.__lookupSetter__(property), SourceClass.prototype.__lookupGetter__(property)];
                    if (Class[name].prototype.__defineSetter__ && Class[name].prototype.__defineGetter__) {
                        setter && Class[name].prototype.__defineSetter__(property, setter);
                        getter && Class[name].prototype.__defineGetter__(property, getter);
                    }
                }
            });
            return Class;
        })[0])[name] as any;
    }, base);
} //> extender(...)

…or something like this:

The XYZ Doohickey Company was founded in 1971, and has been providing quality doohickeys to the public ever since. Located in Gotham City, XYZ employs over 2,000 people and does all kinds of awesome things for the Gotham community.

As a new WordPress user, you should go to your dashboard to delete this page and create new pages for your content. Have fun!