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