codejump

Dynamic Modules

Preview — 3 of 10 questions

A static register() method on a dynamic module must return what?

AA plain provider object
BA DynamicModule object containing at least the module property plus optional imports/providers/exports/controllers/global
CThe class instance of the module
DA Promise<void>

Which statement best captures the conventional distinction among these dynamic-module methods?

Aregister() configures a module per-import with options, forRoot() configures a shared/global setup once, and *Async() variants resolve options asynchronously via factories/injected providers
BThey are interchangeable names with identical behavior
CforRoot() is for testing only; register() is for production
DforRootAsync() runs synchronously despite the name

What does ConfigurableModuleBuilder from @nestjs/common help you avoid?

AWriting controllers entirely
BImporting reflect-metadata
CThe repetitive boilerplate of authoring register/registerAsync (and their option-token plumbing) for configurable dynamic modules
DDefining DTOs

Sign up free to play

Answer all 10 questions (7 more), see explanations for every answer, and track your score.