@temporalio/internal-workflow-common
Advanced tools
Comparing version 0.19.0-rc.1 to 0.19.0
@@ -18,1 +18,3 @@ import type * as iface from '@temporalio/proto/lib/coresdk'; | ||
export declare function msToNumber(val: string | number): number; | ||
export declare function tsToDate(ts: Timestamp): Date; | ||
export declare function optionalTsToDate(ts: Timestamp | null | undefined): Date | undefined; |
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.msToNumber = exports.msOptionalToNumber = exports.msOptionalToTs = exports.msToTs = exports.falsyMsToTs = exports.msNumberToTs = exports.tsToMs = exports.optionalTsToMs = void 0; | ||
exports.optionalTsToDate = exports.tsToDate = exports.msToNumber = exports.msOptionalToNumber = exports.msOptionalToTs = exports.msToTs = exports.falsyMsToTs = exports.msNumberToTs = exports.tsToMs = exports.optionalTsToMs = void 0; | ||
const long_1 = __importDefault(require("long")); | ||
@@ -78,2 +78,13 @@ const ms_1 = __importDefault(require("ms")); | ||
exports.msToNumber = msToNumber; | ||
function tsToDate(ts) { | ||
return new Date(tsToMs(ts)); | ||
} | ||
exports.tsToDate = tsToDate; | ||
function optionalTsToDate(ts) { | ||
if (ts === undefined || ts === null) { | ||
return undefined; | ||
} | ||
return new Date(tsToMs(ts)); | ||
} | ||
exports.optionalTsToDate = optionalTsToDate; | ||
//# sourceMappingURL=time.js.map |
@@ -46,3 +46,5 @@ import type { google } from '@temporalio/proto/lib/coresdk'; | ||
* Specifies additional indexed information in result of list workflow. The type of value should | ||
* be a primitive (e.g. string, number, boolean), for dates use Date.toISOString(); | ||
* be a primitive (e.g. string, number, boolean). For dates, use Date.toISOString() | ||
* | ||
* Values are always converted using {@link defaultPayloadConverter}, even when a custom data converter is provided. | ||
*/ | ||
@@ -49,0 +51,0 @@ searchAttributes?: Record<string, string | number | boolean>; |
{ | ||
"name": "@temporalio/internal-workflow-common", | ||
"version": "0.19.0-rc.1", | ||
"version": "0.19.0", | ||
"description": "Internal SDK library: users should usually use other packages instead. Included in Workflow bundle.", | ||
@@ -15,3 +15,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@temporalio/proto": "^0.19.0-rc.1", | ||
"@temporalio/proto": "^0.19.0", | ||
"long": "^4.0.0", | ||
@@ -27,3 +27,3 @@ "ms": "^2.1.3" | ||
}, | ||
"gitHead": "186341ed7285e468c145121433f2c239e53934a6" | ||
"gitHead": "02748d3fc3f321669ffa09f0ca012b81900b0fc0" | ||
} |
@@ -77,1 +77,12 @@ import type * as iface from '@temporalio/proto/lib/coresdk'; | ||
} | ||
export function tsToDate(ts: Timestamp): Date { | ||
return new Date(tsToMs(ts)); | ||
} | ||
export function optionalTsToDate(ts: Timestamp | null | undefined): Date | undefined { | ||
if (ts === undefined || ts === null) { | ||
return undefined; | ||
} | ||
return new Date(tsToMs(ts)); | ||
} |
@@ -57,3 +57,5 @@ import type { coresdk, google } from '@temporalio/proto/lib/coresdk'; | ||
* Specifies additional indexed information in result of list workflow. The type of value should | ||
* be a primitive (e.g. string, number, boolean), for dates use Date.toISOString(); | ||
* be a primitive (e.g. string, number, boolean). For dates, use Date.toISOString() | ||
* | ||
* Values are always converted using {@link defaultPayloadConverter}, even when a custom data converter is provided. | ||
*/ | ||
@@ -60,0 +62,0 @@ searchAttributes?: Record<string, string | number | boolean>; |
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
95903
1283
Updated@temporalio/proto@^0.19.0