@slonik/sql-tag
Advanced tools
Comparing version 45.2.0 to 45.2.1
@@ -34,11 +34,11 @@ "use strict"; | ||
if (!(0, hasOwnProperty_1.hasOwnProperty)(subject, 'type')) { | ||
throw new errors_1.UnexpectedStateError('Expected token to include "type" property.'); | ||
return false; | ||
} | ||
const tokenType = subject.type; | ||
if (typeof tokenType !== 'symbol') { | ||
throw new errors_1.UnexpectedStateError('Expected type to be symbol.'); | ||
return false; | ||
} | ||
const tokenTypeName = Symbol.keyFor(tokenType); | ||
if (typeof tokenTypeName !== 'string') { | ||
throw new errors_1.UnexpectedStateError('Expected token type to be a symbol with inferrable key'); | ||
return false; | ||
} | ||
@@ -45,0 +45,0 @@ // It is worth clarifying that we don't care if symbols match. |
@@ -19,4 +19,4 @@ { | ||
"dependencies": { | ||
"@slonik/errors": "^45.2.0", | ||
"@slonik/types": "^45.2.0", | ||
"@slonik/errors": "^45.2.1", | ||
"@slonik/types": "^45.2.1", | ||
"roarr": "^7.21.1", | ||
@@ -87,3 +87,3 @@ "safe-stable-stringify": "^2.4.3", | ||
"types": "./dist/index.d.ts", | ||
"version": "45.2.0" | ||
"version": "45.2.1" | ||
} |
@@ -54,5 +54,3 @@ import { | ||
if (!hasOwnProperty(subject, 'type')) { | ||
throw new UnexpectedStateError( | ||
'Expected token to include "type" property.', | ||
); | ||
return false; | ||
} | ||
@@ -63,3 +61,3 @@ | ||
if (typeof tokenType !== 'symbol') { | ||
throw new UnexpectedStateError('Expected type to be symbol.'); | ||
return false; | ||
} | ||
@@ -70,5 +68,3 @@ | ||
if (typeof tokenTypeName !== 'string') { | ||
throw new UnexpectedStateError( | ||
'Expected token type to be a symbol with inferrable key', | ||
); | ||
return false; | ||
} | ||
@@ -75,0 +71,0 @@ |
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
226746
4087
Updated@slonik/errors@^45.2.1
Updated@slonik/types@^45.2.1