Given an array of directed roads (graph), guaranteed to have no cycles. How can you reach from point 1 to point N?
Frontend
Create a new type based on PartialDelivery that includes only the fields name and address (Pick).
Today we will design a messenger. Review the interface layout and functional requirements. You need to gather non-functional requirements, discuss the technical stack, frontend components and services, data models, API endpoints, and the overall system architecture.
React task: implement a component to find substring occurrences in text. Requirements: load text from API on first render, show loading indicator, handle errors, find matches case-insensitively, highlight matches, show total count, load more text button.
Implement your own memoization (caching) function that caches the result of a function when called repeatedly with the same arguments, including handling primitives and undefined, as well as the ability to clear the cache (clearCache).
How is it better to show a victory message — through alert or rendering it in the UI?
// Describe a type that represents JS objects with a private // identifier and a method to get 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 identifier and creation date field always have the same type. let a = { getId: () => 1, createdAt: [phone] } let b = { getId: () => 'id', createdAt: '[phone]T20:00:00Z' }
How should authorization occur?
What arguments does React.memo accept besides the component itself?
If you run code with Observable without subscribe and Promise without then, how many HTTP requests will be made and why?
Implement your own promiseAll function, which is an analog of Promise.all: takes an array of promises, returns a promise with an array of results in the original order, immediately calls reject on the first rejected.
Look at the first callback you pass to runSpinner (onRoll) — does it accept any argument that you specified?
What other utility types in TypeScript do you know? Name the most popular ones.
Why will the Child component re-render when clicking the 'Rerender' button in the root component, and why does it also re-render when typing in the input?
// Given three types. Based on them, create a Delivery type that contains all fields from the provided types.
How to override the context (this) inside loadScript when calling the function if loadScript uses this?
You need to write a function that returns a function accepting any arguments and wraps a callback (error-first callback style) into a promise (promisify).