massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / table / node_modules / ajv / dist / vocabularies / jtd / discriminator.js
index 16dde01757a64f53307c275830945fb630c6e743..e7074d2794c19cd19ed6271243d6f7d32013be4a 100644 (file)
@@ -12,13 +12,13 @@ const error = {
             ? params.discrError === types_1.DiscrError.Tag
                 ? `tag "${schema}" must be string`
                 : `value of tag "${schema}" must be in mapping`
-            : error_1.typeErrorMessage(cxt, "object");
+            : (0, error_1.typeErrorMessage)(cxt, "object");
     },
     params: (cxt) => {
         const { schema, params } = cxt;
         return params.discrError
-            ? codegen_1._ `{error: ${params.discrError}, tag: ${schema}, tagValue: ${params.tag}}`
-            : error_1.typeErrorParams(cxt, "object");
+            ? (0, codegen_1._) `{error: ${params.discrError}, tag: ${schema}, tagValue: ${params.tag}}`
+            : (0, error_1.typeErrorParams)(cxt, "object");
     },
 };
 const def = {
@@ -27,20 +27,20 @@ const def = {
     implements: ["mapping"],
     error,
     code(cxt) {
-        metadata_1.checkMetadata(cxt);
+        (0, metadata_1.checkMetadata)(cxt);
         const { gen, data, schema, parentSchema } = cxt;
-        const [valid, cond] = nullable_1.checkNullableObject(cxt, data);
+        const [valid, cond] = (0, nullable_1.checkNullableObject)(cxt, data);
         gen.if(cond);
         validateDiscriminator();
-        gen.elseIf(codegen_1.not(valid));
+        gen.elseIf((0, codegen_1.not)(valid));
         cxt.error();
         gen.endIf();
         cxt.ok(valid);
         function validateDiscriminator() {
-            const tag = gen.const("tag", codegen_1._ `${data}${codegen_1.getProperty(schema)}`);
-            gen.if(codegen_1._ `${tag} === undefined`);
+            const tag = gen.const("tag", (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(schema)}`);
+            gen.if((0, codegen_1._) `${tag} === undefined`);
             cxt.error(false, { discrError: types_1.DiscrError.Tag, tag });
-            gen.elseIf(codegen_1._ `typeof ${tag} == "string"`);
+            gen.elseIf((0, codegen_1._) `typeof ${tag} == "string"`);
             validateMapping(tag);
             gen.else();
             cxt.error(false, { discrError: types_1.DiscrError.Tag, tag }, { instancePath: schema });
@@ -49,7 +49,7 @@ const def = {
         function validateMapping(tag) {
             gen.if(false);
             for (const tagValue in parentSchema.mapping) {
-                gen.elseIf(codegen_1._ `${tag} === ${tagValue}`);
+                gen.elseIf((0, codegen_1._) `${tag} === ${tagValue}`);
                 gen.assign(valid, applyTagSchema(tagValue));
             }
             gen.else();