From 1f96aaa69f7a751af16a278d7a098ebbede6fac3 Mon Sep 17 00:00:00 2001 From: Marc Rousavy Date: Mon, 8 Mar 2021 18:04:44 +0100 Subject: [PATCH] Fix `@throws` TypeDocs --- src/Camera.tsx | 4 ++-- src/hooks/useCameraDevices.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Camera.tsx b/src/Camera.tsx index a13bfb4..e58d387 100644 --- a/src/Camera.tsx +++ b/src/Camera.tsx @@ -238,7 +238,7 @@ export class Camera extends React.PureComponent { /** * Take a single photo and write it's content to a temporary file. * - * @throws {CameraCaptureError} When any kind of error occured. Use the `CameraCaptureError.code` property to get the actual error + * @throws {@link CameraCaptureError} When any kind of error occured. Use the `CameraCaptureError.code` property to get the actual error */ public async takePhoto(options?: TakePhotoOptions): Promise { try { @@ -275,7 +275,7 @@ export class Camera extends React.PureComponent { * * @blocking This function is synchronized/blocking. * - * @throws {CameraCaptureError} When any kind of error occured. Use the `CameraCaptureError.code` property to get the actual error + * @throws {@link CameraCaptureError} When any kind of error occured. Use the `CameraCaptureError.code` property to get the actual error * * @example * ```js diff --git a/src/hooks/useCameraDevices.ts b/src/hooks/useCameraDevices.ts index 00421df..2b2f7dd 100644 --- a/src/hooks/useCameraDevices.ts +++ b/src/hooks/useCameraDevices.ts @@ -18,7 +18,7 @@ const DefaultCameraDevices: CameraDevices = { * Gets the best available `CameraDevice`. Devices with more cameras are preferred. * * @returns The best matching `CameraDevice`. - * @throws `CameraRuntimeError` if no device was found. + * @throws {@link CameraRuntimeError} if no device was found. * @example * ```jsx * const device = useCameraDevice() @@ -33,7 +33,7 @@ export function useCameraDevices(): CameraDevices; * * @param {PhysicalCameraDeviceType | LogicalCameraDeviceType} deviceType Specifies a device type which will be used as a device filter. * @returns A `CameraDevice` for the requested device type. - * @throws `CameraRuntimeError` if no device was found. + * @throws {@link CameraRuntimeError} if no device was found. * @example * ```jsx * const device = useCameraDevice('wide-angle-camera')