nishiki-tech / nishiki-frontend

Nishiki is an app for tracking and sharing food inventories within groups for better pantry management.
https://nishiki.tech
MIT License
20 stars 5 forks source link

`@property` is not a standard tag in TSDoc #247

Open nick-y-ito opened 6 months ago

nick-y-ito commented 6 months ago

Description

The @property tag is used across the project; for example, you can find them in src/types/definition.ts. However, this is not a standard tag in TSDoc. The task is to revise those mistakes.

Criteria

Here is the ideal way of writing a TSDoc for interfaces.

/**
 * Represents a detailed report of a transaction.
 */
interface TransactionReport {
    /**
     * The unique identifier for the transaction.
     */
    id: string;

    /**
     * The date and time when the transaction occurred.
     */
    timestamp: Date;

    /**
     * Details of the items involved in the transaction.
     */
    items: Array<{
        /**
         * The item's name.
         */
        name: string;

        /**
         * The quantity of the item that was transacted.
         */
        quantity: number;

        /**
         * The price per unit of the item.
         */
        pricePerUnit: number;
    }>;

    // Additional complex properties...
}

/**
 * Generates a detailed report for a specific transaction.
 * @param transactionId The ID of the transaction.
 * @returns A {@link TransactionReport} object containing detailed information about the transaction.
 */
function generateTransactionReport(transactionId: string): TransactionReport {
    // Implementation...
}

Notes

-