X-Git-Url: https://git.josue.xyz/?a=blobdiff_plain;ds=sidebyside;f=.config%2Fcoc%2Fextensions%2Fnode_modules%2Fcoc-prettier%2Fnode_modules%2Ftable%2Fnode_modules%2Fajv%2Fdist%2Fvocabularies%2Fdiscriminator%2Findex.js;h=fae4b9340487860e641f08804d9e28c07ebc7b38;hb=3be0a9efc698a9570a44456009afc6014812625a;hp=b11ea81e667b108b9b0c720e505418f4a80955fe;hpb=d2f432cc757f42f0318fdddcab8c00b240d47088;p=dotfiles%2F.git diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/table/node_modules/ajv/dist/vocabularies/discriminator/index.js b/.config/coc/extensions/node_modules/coc-prettier/node_modules/table/node_modules/ajv/dist/vocabularies/discriminator/index.js index b11ea81e..fae4b934 100644 --- a/.config/coc/extensions/node_modules/coc-prettier/node_modules/table/node_modules/ajv/dist/vocabularies/discriminator/index.js +++ b/.config/coc/extensions/node_modules/coc-prettier/node_modules/table/node_modules/ajv/dist/vocabularies/discriminator/index.js @@ -6,7 +6,7 @@ const error = { message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag ? `tag "${tagName}" must be string` : `value of tag "${tagName}" must be in oneOf`, - params: ({ params: { discrError, tag, tagName } }) => codegen_1._ `{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`, + params: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._) `{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`, }; const def = { keyword: "discriminator", @@ -27,14 +27,14 @@ const def = { if (!oneOf) throw new Error("discriminator: requires oneOf keyword"); const valid = gen.let("valid", false); - const tag = gen.const("tag", codegen_1._ `${data}${codegen_1.getProperty(tagName)}`); - gen.if(codegen_1._ `typeof ${tag} == "string"`, () => validateMapping(), () => cxt.error(false, { discrError: types_1.DiscrError.Tag, tag, tagName })); + const tag = gen.const("tag", (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(tagName)}`); + gen.if((0, codegen_1._) `typeof ${tag} == "string"`, () => validateMapping(), () => cxt.error(false, { discrError: types_1.DiscrError.Tag, tag, tagName })); cxt.ok(valid); function validateMapping() { const mapping = getMapping(); gen.if(false); for (const tagValue in mapping) { - gen.elseIf(codegen_1._ `${tag} === ${tagValue}`); + gen.elseIf((0, codegen_1._) `${tag} === ${tagValue}`); gen.assign(valid, applyTagSchema(mapping[tagValue])); } gen.else();