En la definición del método, se puede marcar como obsoleto (deprecated) con la justificación. Esto ayudará a que otros developers sepán que deben de utilizar ya la alternativa.
@Deprecated('Most use speak2 method instead')
speak() {
console.log(`${ this.name }, ${ this.name }!`)
}
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install dependencies only when needed | |
FROM node:18-alpine3.15 AS deps | |
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. | |
RUN apk add --no-cache libc6-compat | |
WORKDIR /app | |
COPY package.json yarn.lock ./ | |
RUN yarn install --frozen-lockfile | |
# Build the app with cache dependencies | |
FROM node:18-alpine3.15 AS builder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface SeedProduct { | |
description: string; | |
images: string[]; | |
stock: number; | |
price: number; | |
sizes: ValidSizes[]; | |
slug: string; | |
tags: string[]; | |
title: string; | |
type: ValidTypes; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@IsString() | |
@MinLength(6) | |
@MaxLength(50) | |
@Matches( | |
/(?:(?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/, { | |
message: 'The password must have a Uppercase, lowercase letter and a number' | |
}) | |
password: string; |