src/vs/base/common/errors.ts/isErrorWithActions
export function isErrorWithActions(obj: unknown): obj is IErrorWithActions {
	const candidate = obj as IErrorWithActions | undefined;

	return candidate instanceof Error && Array.isArray(candidate.actions);
}