Bump artifact dependencies if CODEQL_ACTION_ARTIFACT_V2_UPGRADE enabled (#2482)
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com> Co-authored-by: Henry Mercer <henrymercer@github.com>
This commit is contained in:
parent
cf5b0a9041
commit
a196a714b8
5388 changed files with 2176737 additions and 71701 deletions
37
node_modules/@protobuf-ts/runtime/build/commonjs/reflection-scalar-default.js
generated
vendored
Normal file
37
node_modules/@protobuf-ts/runtime/build/commonjs/reflection-scalar-default.js
generated
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.reflectionScalarDefault = void 0;
|
||||
const reflection_info_1 = require("./reflection-info");
|
||||
const reflection_long_convert_1 = require("./reflection-long-convert");
|
||||
const pb_long_1 = require("./pb-long");
|
||||
/**
|
||||
* Creates the default value for a scalar type.
|
||||
*/
|
||||
function reflectionScalarDefault(type, longType = reflection_info_1.LongType.STRING) {
|
||||
switch (type) {
|
||||
case reflection_info_1.ScalarType.BOOL:
|
||||
return false;
|
||||
case reflection_info_1.ScalarType.UINT64:
|
||||
case reflection_info_1.ScalarType.FIXED64:
|
||||
return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbULong.ZERO, longType);
|
||||
case reflection_info_1.ScalarType.INT64:
|
||||
case reflection_info_1.ScalarType.SFIXED64:
|
||||
case reflection_info_1.ScalarType.SINT64:
|
||||
return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbLong.ZERO, longType);
|
||||
case reflection_info_1.ScalarType.DOUBLE:
|
||||
case reflection_info_1.ScalarType.FLOAT:
|
||||
return 0.0;
|
||||
case reflection_info_1.ScalarType.BYTES:
|
||||
return new Uint8Array(0);
|
||||
case reflection_info_1.ScalarType.STRING:
|
||||
return "";
|
||||
default:
|
||||
// case ScalarType.INT32:
|
||||
// case ScalarType.UINT32:
|
||||
// case ScalarType.SINT32:
|
||||
// case ScalarType.FIXED32:
|
||||
// case ScalarType.SFIXED32:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
exports.reflectionScalarDefault = reflectionScalarDefault;
|
||||
Loading…
Add table
Add a link
Reference in a new issue