Parece simples até o entrevistador perguntar "why?". Abaixo, uma estrutura de resposta que dá conta do follow-up.
A resposta, como você fala na entrevista
Wraps an object or operation to add behavior while preserving the expected contract. Examples include timing, logging, and caching around an existing operation.
Framework mechanisms can use similar wrapping ideas. Nest interceptors can surround request handling, while Express middleware follows a chain whose links call next or finish the response. A language-level decorator annotation is not automatically the object-oriented Decorator pattern.
Ler é o primeiro passo. No app, essa pergunta vira flashcard com repetição espaçada, e o módulo tem quiz e simulado para testar o que ficou.
Treinar essa pergunta no app