function getClassPrototypeMembers()

in lib/index.ts [277:304]


function getClassPrototypeMembers(ctor: any): dom.ClassMember[] {
    const names = Object.getOwnPropertyNames(ctor.prototype);
    const members = <dom.ClassMember[]> names
        .filter(n => !isNameToSkip(n))
        .map(name =>
            getPrototypeMember(name, Object.getOwnPropertyDescriptor(ctor.prototype, name)!.value))
        .filter(m => m !== undefined);
    members.sort();
    return members;

    function getPrototypeMember(name: string, obj: any): dom.ClassMember | undefined {
        // Skip non-function objects on the prototype (not sure what to do with these?)
        if (typeof obj !== 'function') {
            return undefined;
        }

        const funcType = getParameterListAndReturnType(obj, parseFunctionBody(obj));
        const result = create.method(name, funcType[0], funcType[1]);
        if (isNativeFunction(obj)) {
            result.comment = 'Native method; no parameter or return type inference available';
        }
        return result;
    }

    function isNameToSkip(s: string) {
        return (s === 'constructor') || (s[0] === '_');
    }
}