// tslint:disable-next-line: interface-name
export default class Mapping {

    public match: {
        event: string,
        selector: string,
        code?: string,
    };

    public output: {
        prefix: string,
        suffix?: string,
    };

    constructor(match, output) {
        if (match.event === undefined) {
            throw new Error("Mapping match event field required");
        }
        if (match.selector === undefined) {
            throw new Error("Mapping match selector field required");
        }
        if (output.prefix === undefined) {
            throw new Error("Mapping output prefix field required");
        }
        this.match = match;
        this.output = output;
    }

}
