As of TypeScript 3.1, the lib.es5.d.ts file provides a couple of predefined types that are very helpful when trying to write generic higher-order functions. In this post, I’m going to show an example of using the Parameters and ReturnType predefined types for just that purpose.
The project I’m working on has a Node.js back end written in TypeScript, with a PostgreSQL database for persistence. We had a production user who encountered an error when the system tried to insert a row into a table that had an integer column in it. The value it was trying to insert was 239.99999999999997, […]
Nearly all applications developed today will integrate with an external service of some kind (HTTP, Bluetooth, etc.). These integrations can pose problems for automated testing, exploratory testing, and even demonstrating functionality to a stakeholder.
According to documentation for Apollo’s GraphQL-tools: You don’t need to specify resolvers for every type in your schema. If you don’t specify a resolver, GraphQL.js falls back to a default one… The documentation goes on to state that the default resolver will look for a property on the parent object with the field name that’s […]
Heroku will terminate a request connection if no data is sent back to the client within 30 seconds. From Heroku’s Router – HTTP timeouts documentation: HTTP requests have an initial 30-second window in which the web process must return response data (either the completed response or some amount of response data to indicate that the […]
I’ve worked on a couple of React/Redux projects now, and it was only recently that I realized some of the re-rendering issues I’ve run into were being caused by incorrectly using connect, and specifically the second argument to connect — mapDispatchToProps.
I ran into an issue where I was unable to run more than one system test at a time without the second (and all other tests) failing. These particular tests involved starting an HTTP server to act as the external API that the application would interact with during the course of the tests. The problem […]
While trying to figure out the best way to structure my “reducer” functions in a Redux-style Xamarin app, I found out that C# 7.0 introduced pattern matching support in switch statements!
I recently needed to find and fix a bug in a web app I’ve been working on. The bug had something to do with code that was updating the dimensions of a third-party generated UI component whenever the window was resized. While troubleshooting the issue, I repeatedly used a handful of the tools provided by […]