Skip to content

Commit

Permalink
docs(tsdoc): fixed remaining tsdoc syntax warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mlaursen committed Feb 20, 2021
1 parent c62027e commit 946f4dd
Show file tree
Hide file tree
Showing 40 changed files with 78 additions and 67 deletions.
8 changes: 4 additions & 4 deletions packages/alert/src/MessageQueue.tsx
Expand Up @@ -25,15 +25,15 @@ export interface MessageQueueProps<M extends ToastMessage>

/**
* An optional function to call when the action button is clicked. This will
* be applied to **all** toasts that appear in this message queue. You will be
* provided the current message followed by the click event.
* be applied to **all** toasts that appear in this message queue. You will
* be provided the current message followed by the click event.
*/
onActionClick?: ActionEventHandler<M>;
}

/**
* This component is used to be able to create a queue of messages with the `Snackbar` and
* `Toast` components with a _fairly_ decent API out of the box.
* This component is used to be able to create a queue of messages with the
* `Snackbar` and `Toast` components with a _fairly_ decent API out of the box.
*/
export function MessageQueue<M extends ToastMessage = ToastMessage>({
timeout = 5000,
Expand Down
2 changes: 1 addition & 1 deletion packages/alert/src/scssVariables.ts
@@ -1,4 +1,4 @@
/**
/*
* This file was generated from @react-md/dev-utils and should not be updated
* manually.
*/
Expand Down
19 changes: 10 additions & 9 deletions packages/alert/src/useMessageQueue.ts
Expand Up @@ -69,8 +69,8 @@ export type MessageActions<M extends Message = ToastMessage> =
| ResetQueueAction;

/**
* This function is used to update the message queue state by adding a new message when
* needed.
* This function is used to update the message queue state by adding a new
* message when needed.
*
* @internal
*/
Expand All @@ -94,8 +94,8 @@ export function handleAddMessage<M extends Message = ToastMessage>(
if (isNext || isImmediate) {
const nextState = state.slice();

// remove the existing message if duplicated messages aren't allowed. This will
// kind of act like a replace + next behavior
// remove the existing message if duplicated messages aren't allowed. This
// will kind of act like a replace + next behavior
if (!isDuplicable && i > 0) {
nextState.splice(i, 1);
}
Expand All @@ -114,8 +114,8 @@ export function handleAddMessage<M extends Message = ToastMessage>(

if (isNormal) {
if (isRestart) {
// creating a new state so that the queue visibility hook can still be triggered
// which will restart the timer
// creating a new state so that the queue visibility hook can still be
// triggered which will restart the timer
return state.slice();
}

Expand Down Expand Up @@ -171,7 +171,8 @@ export interface MessageQueueResult<M extends Message = ToastMessage>
/**
* This is the main logic for the message queue behavior that will handle:
*
* - creating timeouts as needed to show/hide toasts within the SnackbarQueue component
* - creating timeouts as needed to show/hide toasts within the `SnackbarQueue`
* component
* - create a way to push messages with optional priority onto the queue
*
* @internal
Expand Down Expand Up @@ -217,8 +218,8 @@ export function useMessageQueue<M extends Message = ToastMessage>({
);

useEffect(() => {
// this effect will handle all the "logic" for transitioning between each message along with the
// message priority updates.
// this effect will handle all the "logic" for transitioning between each
// message along with the message priority updates.
const [message, nextMessage] = queue;
if (!message) {
return;
Expand Down
2 changes: 1 addition & 1 deletion packages/app-bar/src/scssVariables.ts
@@ -1,4 +1,4 @@
/**
/*
* This file was generated from @react-md/dev-utils and should not be updated
* manually.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/avatar/src/scssVariables.ts
@@ -1,4 +1,4 @@
/**
/*
* This file was generated from @react-md/dev-utils and should not be updated
* manually.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/badge/src/scssVariables.ts
@@ -1,4 +1,4 @@
/**
/*
* This file was generated from @react-md/dev-utils and should not be updated
* manually.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/button/src/scssVariables.ts
@@ -1,4 +1,4 @@
/**
/*
* This file was generated from @react-md/dev-utils and should not be updated
* manually.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/card/src/scssVariables.ts
@@ -1,4 +1,4 @@
/**
/*
* This file was generated from @react-md/dev-utils and should not be updated
* manually.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/chip/src/scssVariables.ts
@@ -1,4 +1,4 @@
/**
/*
* This file was generated from @react-md/dev-utils and should not be updated
* manually.
*/
Expand Down
14 changes: 10 additions & 4 deletions packages/dev-utils/@types/sassdoc.d.ts
@@ -1,13 +1,19 @@
/**
* From the sassdoc documentation:
*
* > sassdoc uses the word "item" to described either a variable, a function, a
* > mixin, or a placeholder.
* @remarks
*
* sassdoc uses the word "item" to described either a variable, a function, a
* mixin, or a placeholder.
*
*
* @remarks
*
* The types will be named and based off of this documentation.
*
* Note: I should probably move this to the DefinitelyTyped repo at some point.
* @see http://sassdoc.com/data-interface/#terminology
*
* @see {@link http://sassdoc.com/data-interface/#terminology|SassDoc Data Interface}
*/
declare module "sassdoc" {
/**
Expand Down Expand Up @@ -556,7 +562,7 @@ declare module "sassdoc" {
throw?: ItemThrow;

/**
* An optional @since annotation that has a version number and an optional
* An optional `@since` annotation that has a version number and an optional
* description.
*/
since?: ItemSince[];
Expand Down
2 changes: 1 addition & 1 deletion packages/dev-utils/src/constants.ts
@@ -1,7 +1,7 @@
import { execSync } from "child_process";
import { join } from "path";

export const COPY_BANNER = `/**
export const COPY_BANNER = `/*
* This file was generated from @react-md/dev-utils and should not be updated
* manually.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/dialog/src/scssVariables.ts
@@ -1,4 +1,4 @@
/**
/*
* This file was generated from @react-md/dev-utils and should not be updated
* manually.
*/
Expand Down
6 changes: 3 additions & 3 deletions packages/dialog/src/useNestedDialogFixes.ts
Expand Up @@ -22,9 +22,9 @@ interface ReturnValue {
* overlay and escape keypress will be disabled.
*
* NOTE: This will not work if you nest dialogs together and have them become
* visible at the same time because the ids will get added from child -&gt;
* parent instead of parent -&gt; child. This flow shouldn't really happen
* though so it isn't planned on being fixed.
* visible at the same time because the ids will get added from child to parent
* instead of parent -&gt; child. This flow shouldn't really happen though so it
* isn't planned on being fixed.
*/
export function useNestedDialogFixes({
id,
Expand Down
2 changes: 1 addition & 1 deletion packages/divider/src/scssVariables.ts
@@ -1,4 +1,4 @@
/**
/*
* This file was generated from @react-md/dev-utils and should not be updated
* manually.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/documentation/src/constants/packages.ts
@@ -1,4 +1,4 @@
/**
/*
* This file was generated from @react-md/dev-utils and should not be updated
* manually.
*/
Expand Down
18 changes: 9 additions & 9 deletions packages/documentation/src/utils/sassdoc.ts
@@ -1,5 +1,5 @@
/**
* This file was generated from `@react-md/dev-utils` and should not be updated
/*
* This file was generated from @react-md/dev-utils and should not be updated
* manually.
*/

Expand Down Expand Up @@ -177,10 +177,10 @@ export type ItemOutput = string;
* @param {Boolean} my-bool [false] - Another description
* ```
*
* @typeParam T - This can be used if you want to strongly type what types you
* want to use in your sassdoc (normally for case-sensitivity). sassdoc is not
* type sensitive and any type can really be added here. You can also use
* pipes (`|`) to support multiple types.
* @typeParam T - This can be used if you want to strongly type what types
* you want to use in your sassdoc (normally for case-sensitivity). sassdoc
* is not type sensitive and any type can really be added here. You can also
* use pipes (`|`) to support multiple types.
*/
export interface ItemParameter<T extends string = ItemDataType> {
/**
Expand Down Expand Up @@ -559,8 +559,8 @@ export interface BaseItem {
* to some "recommended" capitalized versions that should be used when
* documenting.
*
* @typeParam T - The data type for the `@type` annotation.
* @typeParam IT - - The data type for each item `@prop` annotation.
* @typeParam T - the data type for the `@type` annotation.
* @typeParam IT - The data type for each item `@prop` annotation.
*/
export interface VariableItem<
T extends string = DataType,
Expand Down Expand Up @@ -700,7 +700,7 @@ export interface FormattedItem {

/**
* The package that the item is in. This will not be prefixed
* with `@react-md`.
* with \@react-md.
*/
packageName: string;

Expand Down
2 changes: 1 addition & 1 deletion packages/elevation/src/scssVariables.ts
@@ -1,4 +1,4 @@
/**
/*
* This file was generated from @react-md/dev-utils and should not be updated
* manually.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/expansion-panel/src/scssVariables.ts
@@ -1,4 +1,4 @@
/**
/*
* This file was generated from @react-md/dev-utils and should not be updated
* manually.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/form/src/scssVariables.ts
@@ -1,4 +1,4 @@
/**
/*
* This file was generated from @react-md/dev-utils and should not be updated
* manually.
*/
Expand Down
8 changes: 4 additions & 4 deletions packages/form/src/slider/utils.ts
Expand Up @@ -131,7 +131,7 @@ export interface SliderDragValue {
value: number;

/**
* The current percentage dragged number (> 0 and < 1). This is used only
* The current percentage dragged number (`> 0` and `< 1`). This is used only
* while dragging with the mouse or touch since it makes the drag experience
* smoother. If this is omitted and there is a small number of "steps" in the
* range, the mouse/touch won't align with the thumb since it will only move
Expand All @@ -149,11 +149,11 @@ export interface SliderDragValue {
* - new-value-at = 1000px / (100 / 20)
* - new-value-at = 1000px / 5
* - new-value-at = 200px
* - user drags from 0px -&gt; 10px
* - user drags from `0px -> 10px`
* - no visual change
* - user drags from 10px -&gt; 190px
* - user drags from `10px -> 190px`
* - no visual change
* - user drags from 190px -&gt; 200px
* - user drags from `190px -> 200px`
* - visual change to first step
*
* The current value allows for a visual change while the user drags, but the
Expand Down
2 changes: 1 addition & 1 deletion packages/icon/src/scssVariables.ts
@@ -1,4 +1,4 @@
/**
/*
* This file was generated from @react-md/dev-utils and should not be updated
* manually.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/layout/src/scssVariables.ts
@@ -1,4 +1,4 @@
/**
/*
* This file was generated from @react-md/dev-utils and should not be updated
* manually.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/link/src/scssVariables.ts
@@ -1,4 +1,4 @@
/**
/*
* This file was generated from @react-md/dev-utils and should not be updated
* manually.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/list/src/scssVariables.ts
@@ -1,4 +1,4 @@
/**
/*
* This file was generated from @react-md/dev-utils and should not be updated
* manually.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/media/src/scssVariables.ts
@@ -1,4 +1,4 @@
/**
/*
* This file was generated from @react-md/dev-utils and should not be updated
* manually.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/menu/src/scssVariables.ts
@@ -1,4 +1,4 @@
/**
/*
* This file was generated from @react-md/dev-utils and should not be updated
* manually.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/overlay/src/scssVariables.ts
@@ -1,4 +1,4 @@
/**
/*
* This file was generated from @react-md/dev-utils and should not be updated
* manually.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/progress/src/scssVariables.ts
@@ -1,4 +1,4 @@
/**
/*
* This file was generated from @react-md/dev-utils and should not be updated
* manually.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/sheet/src/scssVariables.ts
@@ -1,4 +1,4 @@
/**
/*
* This file was generated from @react-md/dev-utils and should not be updated
* manually.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/states/src/scssVariables.ts
@@ -1,4 +1,4 @@
/**
/*
* This file was generated from @react-md/dev-utils and should not be updated
* manually.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/table/src/scssVariables.ts
@@ -1,4 +1,4 @@
/**
/*
* This file was generated from @react-md/dev-utils and should not be updated
* manually.
*/
Expand Down
4 changes: 4 additions & 0 deletions packages/tabs/src/TabsManager.tsx
Expand Up @@ -18,11 +18,15 @@ export interface TabsManagerContext {
* This is an id prefix to use for all the child Tab, TabList, and TabPanel
* components.
*
* @example
* id behavior
* ```
* - `Tabs` -> id={id}
* - `Tab` ->
* - id={`${id}-tab-${index + 1}`}
* - panelId={active && `${id}-panel-${index + 1}`}
* - `TabPanel` -> id={`${id}-panel-${index + 1}`}
* ```
*/
tabsId: string;

Expand Down
2 changes: 1 addition & 1 deletion packages/tabs/src/scssVariables.ts
@@ -1,4 +1,4 @@
/**
/*
* This file was generated from @react-md/dev-utils and should not be updated
* manually.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/theme/src/scssVariables.ts
@@ -1,4 +1,4 @@
/**
/*
* This file was generated from @react-md/dev-utils and should not be updated
* manually.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/tooltip/src/scssVariables.ts
@@ -1,4 +1,4 @@
/**
/*
* This file was generated from @react-md/dev-utils and should not be updated
* manually.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/transition/src/scssVariables.ts
@@ -1,4 +1,4 @@
/**
/*
* This file was generated from @react-md/dev-utils and should not be updated
* manually.
*/
Expand Down
4 changes: 2 additions & 2 deletions packages/transition/src/types.ts
Expand Up @@ -140,10 +140,10 @@ export interface TransitionOptions<E extends HTMLElement = HTMLDivElement>
* - `EXITED`
*
* Changing from `false` to `true`, the stagees will change in this order:
* `EXITED` -&gt; `ENTER` -&gt; `ENTERING` -&gt; `ENTERED`
* `EXITED -> ENTER -> ENTERING -> ENTERED`
*
* Changing from `true` to `false`, the stagees will change in this order:
* `ENTERED` -&gt; `EXIT` -&gt; `EXITING` -&gt; `EXITED`
* `ENTERED -> EXIT -> EXITING -> EXITED`
*/
transitionIn: boolean;

Expand Down