JSDoc, closes #5874
This commit is contained in:
@@ -2,17 +2,17 @@ import * as React from "react";
|
|||||||
import { useMousePosition } from "~/hooks/useMousePosition";
|
import { useMousePosition } from "~/hooks/useMousePosition";
|
||||||
|
|
||||||
type Positions = {
|
type Positions = {
|
||||||
/* Sub-menu x */
|
/** Sub-menu x */
|
||||||
x: number;
|
x: number;
|
||||||
/* Sub-menu y */
|
/** Sub-menu y */
|
||||||
y: number;
|
y: number;
|
||||||
/* Sub-menu height */
|
/** Sub-menu height */
|
||||||
h: number;
|
h: number;
|
||||||
/* Sub-menu width */
|
/** Sub-menu width */
|
||||||
w: number;
|
w: number;
|
||||||
/* Mouse x */
|
/** Mouse x */
|
||||||
mouseX: number;
|
mouseX: number;
|
||||||
/* Mouse y */
|
/** Mouse y */
|
||||||
mouseY: number;
|
mouseY: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ const DELAY_OPEN = 500;
|
|||||||
const DELAY_CLOSE = 600;
|
const DELAY_CLOSE = 600;
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
/* The HTML element that is being hovered over */
|
/** The HTML element that is being hovered over */
|
||||||
element: HTMLAnchorElement;
|
element: HTMLAnchorElement;
|
||||||
/* A callback on close of the hover preview */
|
/** A callback on close of the hover preview */
|
||||||
onClose: () => void;
|
onClose: () => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ import * as React from "react";
|
|||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
/* The emoji to render */
|
/** The emoji to render */
|
||||||
emoji: string;
|
emoji: string;
|
||||||
/* The size of the emoji, 24px is default to match standard icons */
|
/** The size of the emoji, 24px is default to match standard icons */
|
||||||
size?: number;
|
size?: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ type Props = {
|
|||||||
size?: number;
|
size?: number;
|
||||||
/** The color of the icon, defaults to the current text color */
|
/** The color of the icon, defaults to the current text color */
|
||||||
color?: string;
|
color?: string;
|
||||||
/* Whether the safe area should be removed and have graphic across full size */
|
/** Whether the safe area should be removed and have graphic across full size */
|
||||||
cover?: boolean;
|
cover?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ export type Props = React.InputHTMLAttributes<
|
|||||||
margin?: string | number;
|
margin?: string | number;
|
||||||
error?: string;
|
error?: string;
|
||||||
icon?: React.ReactNode;
|
icon?: React.ReactNode;
|
||||||
/* Callback is triggered with the CMD+Enter keyboard combo */
|
/** Callback is triggered with the CMD+Enter keyboard combo */
|
||||||
onRequestSubmit?: (
|
onRequestSubmit?: (
|
||||||
ev: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>
|
ev: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>
|
||||||
) => unknown;
|
) => unknown;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
/* Set to true if displaying a single symbol character to disable monospace */
|
/** Set to true if displaying a single symbol character to disable monospace */
|
||||||
symbol?: boolean;
|
symbol?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import Tooltip from "../Tooltip";
|
|||||||
import NotificationListItem from "./NotificationListItem";
|
import NotificationListItem from "./NotificationListItem";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
/* Callback when the notification panel wants to close. */
|
/** Callback when the notification panel wants to close. */
|
||||||
onRequestClose: () => void;
|
onRequestClose: () => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ type Props = Omit<NavLinkProps, "to"> & {
|
|||||||
to?: LocationDescriptor;
|
to?: LocationDescriptor;
|
||||||
innerRef?: (ref: HTMLElement | null | undefined) => void;
|
innerRef?: (ref: HTMLElement | null | undefined) => void;
|
||||||
onClick?: React.MouseEventHandler<HTMLAnchorElement>;
|
onClick?: React.MouseEventHandler<HTMLAnchorElement>;
|
||||||
/* Callback when we expect the user to click on the link. Used for prefetching data. */
|
/** Callback when we expect the user to click on the link. Used for prefetching data. */
|
||||||
onClickIntent?: () => void;
|
onClickIntent?: () => void;
|
||||||
onDisclosureClick?: React.MouseEventHandler<HTMLButtonElement>;
|
onDisclosureClick?: React.MouseEventHandler<HTMLButtonElement>;
|
||||||
icon?: React.ReactNode;
|
icon?: React.ReactNode;
|
||||||
@@ -32,7 +32,7 @@ type Props = Omit<NavLinkProps, "to"> & {
|
|||||||
showActions?: boolean;
|
showActions?: boolean;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
active?: boolean;
|
active?: boolean;
|
||||||
/* If set, a disclosure will be rendered to the left of any icon */
|
/** If set, a disclosure will be rendered to the left of any icon */
|
||||||
expanded?: boolean;
|
expanded?: boolean;
|
||||||
isActiveDrop?: boolean;
|
isActiveDrop?: boolean;
|
||||||
isDraft?: boolean;
|
isDraft?: boolean;
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ import {
|
|||||||
} from "../errors";
|
} from "../errors";
|
||||||
|
|
||||||
type AuthenticationOptions = {
|
type AuthenticationOptions = {
|
||||||
/* An admin user role is required to access the route */
|
/** An admin user role is required to access the route */
|
||||||
admin?: boolean;
|
admin?: boolean;
|
||||||
/* A member or admin user role is required to access the route */
|
/** A member or admin user role is required to access the route */
|
||||||
member?: boolean;
|
member?: boolean;
|
||||||
/**
|
/**
|
||||||
* Authentication is parsed, but optional. Note that if a token is provided
|
* Authentication is parsed, but optional. Note that if a token is provided
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ describe("CleanupExpiredFileOperationsTask", () => {
|
|||||||
state: FileOperationState.Complete,
|
state: FileOperationState.Complete,
|
||||||
});
|
});
|
||||||
|
|
||||||
/* This is a test helper that creates a new task and runs it. */
|
|
||||||
const task = new CleanupExpiredFileOperationsTask();
|
const task = new CleanupExpiredFileOperationsTask();
|
||||||
await task.perform({ limit: 100 });
|
await task.perform({ limit: 100 });
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ describe("ErrorTimedOutFileOperationsTask", () => {
|
|||||||
state: FileOperationState.Complete,
|
state: FileOperationState.Complete,
|
||||||
});
|
});
|
||||||
|
|
||||||
/* This is a test helper that creates a new task and runs it. */
|
|
||||||
const task = new ErrorTimedOutFileOperationsTask();
|
const task = new ErrorTimedOutFileOperationsTask();
|
||||||
await task.perform({ limit: 100 });
|
await task.perform({ limit: 100 });
|
||||||
|
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import FileStorage from "@server/storage/files";
|
|||||||
import BaseTask, { TaskPriority } from "./BaseTask";
|
import BaseTask, { TaskPriority } from "./BaseTask";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
/* The teamId to operate on */
|
/** The teamId to operate on */
|
||||||
teamId: string;
|
teamId: string;
|
||||||
/* The original avatarUrl from the SSO provider */
|
/** The original avatarUrl from the SSO provider */
|
||||||
avatarUrl: string;
|
avatarUrl: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import FileStorage from "@server/storage/files";
|
|||||||
import BaseTask, { TaskPriority } from "./BaseTask";
|
import BaseTask, { TaskPriority } from "./BaseTask";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
/* The userId to operate on */
|
/** The userId to operate on */
|
||||||
userId: string;
|
userId: string;
|
||||||
/* The original avatarUrl from the SSO provider */
|
/** The original avatarUrl from the SSO provider */
|
||||||
avatarUrl: string;
|
avatarUrl: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -391,15 +391,15 @@ export type NotificationMetadata = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export type JSONExportMetadata = {
|
export type JSONExportMetadata = {
|
||||||
/* The version of the export, allows updated structure in the future. */
|
/** The version of the export, allows updated structure in the future. */
|
||||||
exportVersion: number;
|
exportVersion: number;
|
||||||
/* The version of the application that created the export. */
|
/** The version of the application that created the export. */
|
||||||
version: string;
|
version: string;
|
||||||
/* The date the export was created. */
|
/** The date the export was created. */
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
/* The ID of the user that created the export. */
|
/** The ID of the user that created the export. */
|
||||||
createdById: string;
|
createdById: string;
|
||||||
/* The email of the user that created the export. */
|
/** The email of the user that created the export. */
|
||||||
createdByEmail: string | null;
|
createdByEmail: string | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import env from "@server/env";
|
|||||||
import OAuthClient from "./oauth";
|
import OAuthClient from "./oauth";
|
||||||
|
|
||||||
type AzurePayload = {
|
type AzurePayload = {
|
||||||
/* A GUID that represents the Azure AD tenant that the user is from */
|
/** A GUID that represents the Azure AD tenant that the user is from */
|
||||||
tid: string;
|
tid: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user