Sobes.tech

What are the known provider configuration options in Angular: useClass, useExisting, useValue, and useFactory? When should they be used?

285

How do we view message history if it is very large? How to implement pagination?

267

Make the victory/defeat message disappear during the spinning of the drum.

252

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)?

234

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?

227

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.

226

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?

226

Have you ever written your own RxJS operators?

223

How to fix unnecessary re-renders so that only App re-renders on 'Rerender' click, and only Parent (without Child) on text input?

222

Why should you rely on a count variable in the implementation of promiseAll instead of simply checking the length of the results array?

218

What types of Subject exist in RxJS?

214

What projects have you had to design — from scratch or large architectural blocks?

214

// 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' }

212

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

207

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.

207

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.

204

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.

201

Based on Partial<Delivery>, create a new type that only takes the fields name and address. Which utility type is suitable for this?.

201

What is the difference between Observable and Promise when there are multiple subscriptions/handlers: how many requests and console.log will be executed?

200

In the second part of the TypeScript task: transform all fields of the Delivery type object into a new type using TypeScript utility types.

198
/5