addons/shared/types/common.tsblame
View source
b69ab311/**
b69ab312 * Copyright (c) Meta Platforms, Inc. and affiliates.
b69ab313 *
b69ab314 * This source code is licensed under the MIT license found in the
b69ab315 * LICENSE file in the root directory of this source tree.
b69ab316 */
b69ab317
b69ab318/* Common types useful in source control. */
b69ab319
b69ab3110/** Hex commit hash. */
b69ab3111export type Hash = string;
b69ab3112
b69ab3113/** Path in the repository. Uses '/' path separator on all platforms. */
b69ab3114export type RepoPath = string;
b69ab3115
b69ab3116/**
b69ab3117 * Timestamp with timezone. [UTC unix timestamp in seconds, timezone offset].
b69ab3118 *
b69ab3119 * Use `sl dbsh` to check the format. For example:
b69ab3120 *
b69ab3121 * ```
b69ab3122 * In [1]: util.parsedate('now')
b69ab3123 * Out[1]: (1679592842, 25200)
b69ab3124 *
b69ab3125 * In [2]: util.parsedate('May 1 +0800')
b69ab3126 * Out[2]: (1682870400, -28800)
b69ab3127 * ```
b69ab3128 */
b69ab3129export type DateTuple = [number, number];
b69ab3130
b69ab3131/** Author with email. For example, "Test <test@example.com>". */
b69ab3132export type Author = string;