/*
 * searchoption.js
 *
 * encapsulates a search option
 */

"use strict";

export class SearchOption {
    shortarg: string;
    longarg: string;
    desc: string;
    public sortarg: string;

    constructor(shortarg: string, longarg: string, desc: string) {
        this.shortarg = shortarg;
        this.longarg = longarg;
        this.desc = desc;
        this.sortarg = this.getSortarg();
    }

    private getSortarg(): string {
        if (this.shortarg)
            return this.shortarg.toLowerCase() + 'a' + this.longarg.toLowerCase();
        return this.longarg.toLowerCase();
    }
}

/*
 * searchoption.js
 *
 * encapsulates a search option
 */

"use strict";

interface SettingsFunc {
    (): void;
}

export class SearchOption {
    shortarg: string;
    longarg: string;
    desc: string;
    func: SettingsFunc;
    public sortarg: string;

    constructor(shortarg: string, longarg: string, desc: string, func: SettingsFunc) {
        this.shortarg = shortarg;
        this.longarg = longarg;
        this.desc = desc;
        this.func = func;
        this.sortarg = this.getSortarg();
    }

    private getSortarg(): string {
        if (this.shortarg)
            return this.shortarg.toLowerCase() + 'a' + this.longarg.toLowerCase();
        return this.longarg.toLowerCase();
    }
}

--- 
+++ 
@@ -6,22 +6,16 @@
 
 "use strict";
 
-interface SettingsFunc {
-    (): void;
-}
-
 export class SearchOption {
     shortarg: string;
     longarg: string;
     desc: string;
-    func: SettingsFunc;
     public sortarg: string;
 
-    constructor(shortarg: string, longarg: string, desc: string, func: SettingsFunc) {
+    constructor(shortarg: string, longarg: string, desc: string) {
         this.shortarg = shortarg;
         this.longarg = longarg;
         this.desc = desc;
-        this.func = func;
         this.sortarg = this.getSortarg();
     }
 
Remove func property from SearchOption
