move deprecation check down
This commit is contained in:
parent
3323e0f3a5
commit
7fc28cb63f
@ -104,12 +104,14 @@ export default class File {
|
||||
|
||||
for (let key in File.options) {
|
||||
let option = File.options[key];
|
||||
|
||||
var val = opts[key];
|
||||
if (!val && option.optional) continue;
|
||||
|
||||
if (option.deprecated) {
|
||||
throw new Error("Deprecated option " + key + ": " + option.deprecated);
|
||||
}
|
||||
|
||||
var val = opts[key];
|
||||
if (!val && option.optional) continue;
|
||||
if (val == null) val = option.default || val;
|
||||
|
||||
var optionParser = optionParsers[option.type];
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
export var metadata = {
|
||||
experimental: true,
|
||||
optional: true,
|
||||
stage: 1
|
||||
};
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import * as t from "../../../types";
|
||||
|
||||
export var metadata = {
|
||||
experimental: true,
|
||||
optional: true,
|
||||
stage: 0
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user