830 B33 lines
Blame
1/**
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8/* Common types useful in source control. */
9
10/** Hex commit hash. */
11export type Hash = string;
12
13/** Path in the repository. Uses '/' path separator on all platforms. */
14export type RepoPath = string;
15
16/**
17 * Timestamp with timezone. [UTC unix timestamp in seconds, timezone offset].
18 *
19 * Use `sl dbsh` to check the format. For example:
20 *
21 * ```
22 * In [1]: util.parsedate('now')
23 * Out[1]: (1679592842, 25200)
24 *
25 * In [2]: util.parsedate('May 1 +0800')
26 * Out[2]: (1682870400, -28800)
27 * ```
28 */
29export type DateTuple = [number, number];
30
31/** Author with email. For example, "Test <test@example.com>". */
32export type Author = string;
33