A class representing a book review with processing workflow.

import { Book } from "./Book";
import { Review } from "./Review";

// Setup review data
const book = new Book("The Catcher in the Rye");

// Create review instance
const review = new Review(book, 5, sanitizedComment, "Literary Critic");

// Process review
console.log("Processing review...");
const isValidReview = review.isValid();
Review processing (setup + process, excluding validation)

Constructors

  • Parameters

    • book: Book
    • rating: number
    • comment: string
    • reviewerName: string

    Returns Review

Properties

book: Book
comment: string
rating: number
reviewerName: string

Methods

  • Returns string