What are the known provider configuration options in Angular: useClass, useExisting, useValue, and useFactory? When should they be used?
Frontend
How do we view message history if it is very large? How to implement pagination?
Make the victory/defeat message disappear during the spinning of the drum.
If you need to increase the number of rollers, for example, to ten, how to make the implementation flexible so as not to store values manually for each roller (for example, through the parameter numberOfRollers and Array.from)?
Look at the code with a class that has a constructor with a field multiplier, an add method for adding numbers to an array, and a getMultiSum method implemented as a regular function. What will be output in the console when this code is run?
Third part of the TypeScript task: create a new type based on the Delivery type, where all fields are optional (can have the value undefined) and cannot change their value (readonly). Use utility types Partial and Readonly.
If you pass clearCache not through a closure (callback), but as a direct reference to the map.clear method (for example, clearCache = cache.clear), will it work correctly? How can this be fixed?
Have you ever written your own RxJS operators?
How to fix unnecessary re-renders so that only App re-renders on 'Rerender' click, and only Parent (without Child) on text input?
Why should you rely on a count variable in the implementation of promiseAll instead of simply checking the length of the results array?
What types of Subject exist in RxJS?
What projects have you had to design — from scratch or large architectural blocks?
// There are also 25 objects that // have a private identifier and a method to assign it // as well as a creation date field. // The identifier can contain a number or a string. // The creation field can also contain a string or a number. // The types for creation date and identifier match (either string or number) // Describe the type for such objects let a = { getId: () => createdId: [phone] } let b = { getId: () => 'id', createdAt: '[phone]T20:00:00Z' } // this object SHOULD NOT match the type: let c = { getId: () => 56, createdAt: '[phone]T20:00:00Z' }
Tetris pieces fall vertically downward in sequence. The pieces cannot be moved or rotated - just find the height of the resulting tower. The order of falling pieces is given by an array of numbers 1, 2, or 3. The pieces are shown below. findHeight([1,2,3]) => 7 findHeight([1,1,1,1]) => 12
Implement your own Event Emitter with subscribe, unsubscribe, and event generation methods (on, off, emit). Store event handlers, test the functionality with test data, and support method chaining.
You need to write a TypeScript type that will be suitable for a function returning a number and for a function returning a string (via generic), but should not pass if the return types are different.
Implement a memoize function that caches the result of a function call for identical arguments (primitives), and add a clearCache method to clear the cache.
Based on Partial<Delivery>, create a new type that only takes the fields name and address. Which utility type is suitable for this?.
What is the difference between Observable and Promise when there are multiple subscriptions/handlers: how many requests and console.log will be executed?
In the second part of the TypeScript task: transform all fields of the Delivery type object into a new type using TypeScript utility types.