Fix verify bug
This commit is contained in:
parent
363dcf3e7d
commit
e1e4ce0740
@ -7612,7 +7612,7 @@ var TypescriptTarget = class extends CompileTarget {
|
|||||||
a(2 + off, `if(typeof ${varName} !== "boolean") throw new VerificationError("boolean", "${field.name}", ${varName});`);
|
a(2 + off, `if(typeof ${varName} !== "boolean") throw new VerificationError("boolean", "${field.name}", ${varName});`);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
a(2 + off, `if(!verify_${field.type}(${varName})) throw new VerificationError("${field.type}", "${field.name}", ${varName});`);
|
a(2 + off, `verify_${field.type}(${varName});`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (field.array) {
|
if (field.array) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hibas123/jrpcgen",
|
"name": "@hibas123/jrpcgen",
|
||||||
"version": "1.0.9",
|
"version": "1.0.10",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"packageManager": "yarn@3.1.1",
|
"packageManager": "yarn@3.1.1",
|
||||||
|
@ -183,7 +183,7 @@ export class TypescriptTarget extends CompileTarget {
|
|||||||
default:
|
default:
|
||||||
a(
|
a(
|
||||||
2 + off,
|
2 + off,
|
||||||
`if(!verify_${field.type}(${varName})) throw new VerificationError("${field.type}", "${field.name}", ${varName});`
|
`verify_${field.type}(${varName});`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user