2020-05-15 16:53:45 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) Sapphirecode - All Rights Reserved
|
|
|
|
* This file is part of console-app which is released under MIT.
|
|
|
|
* See file 'LICENSE' for full license details.
|
|
|
|
* Created by Timo Hocker <timo@scode.ovh>, May 2020
|
|
|
|
*/
|
|
|
|
|
2020-06-09 13:13:27 +02:00
|
|
|
import { ErrorCallback } from '../ErrorCallback';
|
|
|
|
import { OptionValue, Option } from '../Option';
|
2020-05-09 19:51:43 +02:00
|
|
|
|
|
|
|
export abstract class OptionSource {
|
2020-06-09 13:13:27 +02:00
|
|
|
public abstract async parse(opt: Option, value: OptionValue): Promise<void>;
|
2020-05-09 19:51:43 +02:00
|
|
|
|
2020-05-28 18:46:35 +02:00
|
|
|
protected error_callback?: ErrorCallback;
|
|
|
|
|
|
|
|
public constructor (error_callback?: ErrorCallback) {
|
|
|
|
this.error_callback = error_callback;
|
|
|
|
}
|
2020-05-09 19:51:43 +02:00
|
|
|
}
|