Comparing version 35.2.1 to 36.0.0
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createBigintTypeParser = void 0; | ||
// eslint-disable-next-line unicorn/prefer-native-coercion-functions | ||
const bigintParser = (value) => { | ||
// @todo Use bigint when value is greater than Number.MAX_SAFE_INTEGER. | ||
return Number.parseInt(value, 10); | ||
return BigInt(value); | ||
}; | ||
@@ -8,0 +8,0 @@ const createBigintTypeParser = () => { |
@@ -275,3 +275,3 @@ /// <reference types="node" /> | ||
}; | ||
export type PrimitiveValueExpression = Buffer | boolean | number | string | readonly PrimitiveValueExpression[] | null; | ||
export type PrimitiveValueExpression = Buffer | bigint | boolean | number | string | readonly PrimitiveValueExpression[] | null; | ||
export type SqlToken = ArraySqlToken | BinarySqlToken | DateSqlToken | FragmentSqlToken | IdentifierSqlToken | IntervalSqlToken | JsonBinarySqlToken | JsonSqlToken | ListSqlToken | QuerySqlToken | TimestampSqlToken | UnnestSqlToken; | ||
@@ -278,0 +278,0 @@ export type ValueExpression = PrimitiveValueExpression | SqlFragment | SqlToken; |
@@ -1,2 +0,2 @@ | ||
export declare const isPrimitiveValueExpression: (maybe: unknown) => maybe is string | number | boolean | null; | ||
export declare const isPrimitiveValueExpression: (maybe: unknown) => maybe is string | number | bigint | boolean | null; | ||
//# sourceMappingURL=isPrimitiveValueExpression.d.ts.map |
@@ -8,2 +8,3 @@ "use strict"; | ||
typeof maybe === 'boolean' || | ||
typeof maybe === 'bigint' || | ||
maybe === null); | ||
@@ -10,0 +11,0 @@ }; |
@@ -100,3 +100,3 @@ { | ||
"types": "./dist/index.d.ts", | ||
"version": "35.2.1" | ||
"version": "36.0.0" | ||
} |
import { type TypeParser } from '../../types'; | ||
// eslint-disable-next-line unicorn/prefer-native-coercion-functions | ||
const bigintParser = (value: string) => { | ||
// @todo Use bigint when value is greater than Number.MAX_SAFE_INTEGER. | ||
return Number.parseInt(value, 10); | ||
return BigInt(value); | ||
}; | ||
@@ -7,0 +7,0 @@ |
@@ -356,2 +356,3 @@ import { type SlonikError } from './errors'; | ||
| Buffer | ||
| bigint | ||
| boolean | ||
@@ -358,0 +359,0 @@ | number |
export const isPrimitiveValueExpression = ( | ||
maybe: unknown, | ||
): maybe is boolean | number | string | null => { | ||
): maybe is bigint | boolean | number | string | null => { | ||
return ( | ||
@@ -8,4 +8,5 @@ typeof maybe === 'string' || | ||
typeof maybe === 'boolean' || | ||
typeof maybe === 'bigint' || | ||
maybe === null | ||
); | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
506260
7393