W3
Teacher
Explore
Browse by field
Artificial Intelligence
Accounting & Finance
Information Technology
Show all fields
Interview Q&A
All Interview Questions
Beginner
Intermediate
Advanced
Practice
MCQs
Quizzes
Mock Interviews
About
Light
Dark
Auto
Sign in
Get Started
Search interview questions
Search
45 questions for “Decorators”
Found in 1 field. Select a question to see its full answer.
Matching topics
Python
Decorators
15
TypeScript
Decorators
10
Information Technology
45 questions in 2 technologies
#
Question
Technology
Topic
Level
1
In what order do multiple
decorators
applied to the same declaration execute?
TypeScript › Decorators
TypeScript
Decorators
Advanced
2
How do parameter
decorators
work, and what is a common real-world use for them?
TypeScript › Decorators
TypeScript
Decorators
Advanced
3
How do the newer, TC39 'Stage 3'
decorators
differ from TypeScript's legacy experimental
Decorators
implementation?
TypeScript › Decorators
TypeScript
Decorators
Advanced
4
Why can
decorators
make code harder to statically analyze or tree-shake, and what's a common criticism of overusing them?
TypeScript › Decorators
TypeScript
Decorators
Advanced
5
How do you stack MULTIPLE
decorators
on the same function, and in what order do they actually execute?
Python › Decorators
Python
Decorators
Advanced
6
How does @functools.wraps preserve metadata when writing
decorators
?
Python › functools & Functional Programming Tools
Python
functools & Functional Programming Tools
Intermediate
7
How would you implement a function that dynamically inspects its own call arguments at runtime using the 'inspect' module, useful for building generic validation or logging
decorators
?
Python › Functions & Scope
Python
Functions & Scope
Advanced
8
What is a decorator in TypeScript, and what does the @ syntax mean?
TypeScript › Decorators
TypeScript
Decorators
Beginner
9
What must be enabled in tsconfig.json to use the (legacy, 'experimental') decorator syntax?
TypeScript › Decorators
TypeScript
Decorators
Beginner
10
What is a decorator, and how does the @decorator_name syntax relate to a plain function call?
Python › Decorators
Python
Decorators
Beginner
Show all 45 questions in Information Technology