1// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
2// See the LICENCE file in the repository root for full licence text.
3
4export default interface ErrorJson {
5 error: string;
6}
7
8export function isErrorJson(arg: unknown): arg is ErrorJson {
9 return typeof arg === 'object'
10 && arg != null
11 && 'error' in arg
12 && typeof arg.error === 'string';
13}