| 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 | * @flow |
| 8 | */ |
| 9 | |
| 10 | declare function isArray<T>( |
| 11 | v: T, |
| 12 | // eslint-disable-next-line |
| 13 | ): v is T extends $ReadOnlyArray<mixed> ? T : empty; |
| 14 | |
| 15 | const isArrayImpl = Array.isArray; |
| 16 | |
| 17 | function isArray(a: mixed): boolean { |
| 18 | return isArrayImpl(a); |
| 19 | } |
| 20 | |
| 21 | export default isArray; |