Programming
Curl a GraphQL API
1 2 3 4 5 6 7 curl -0 -v -X POST https://some.api.com/graphql \ -H 'Content-Type: application/json' \ -d @- << EOF { "query": "query { …
Read →Function Overloading
Take a function like below… 1 2 3 4 5 6 7 8 type Combinable = string | number function add(a: Combinable, b: Combinable): Combinable { if (typeof a === …
Read →Nullish Coalescing
1 2 // say you have some var hangin' around called `name` let x: string = name ?? '(no name)' ?? is the nullish coalescing operator. It differs from …
Read →Recursive Type Aliases
In TS@4 a type can reference itself, e.g. 1 2 3 4 5 6 7 8 9 type JSONValue = | string | number | boolean | null | JSONValue[] | { [k: string]: JSONValue } …
Read →Labeled Tuple Types
1 type Address = [number, string, string, number] Say you now have a function printAddress which takes an Address type as its arg. 1 2 3 function …
Read →Variadic Tuple Types
1 type Foo<T extends any[]> = [boolean, ...T, boolean] Before TS@4.0 ...T would need to be the last element, but now we can spread the T type nested …
Read →Composite Builds
TypeScript has a way of describing a build process as multiple subpieces of a project. This saves from having to build every piece, and instead build …
Read →Jest Setup for a Monorepo
Out of the box, Jest mostly works in a Monorepo environment, with the exception of a few Babel plugins so that (as an example) TypeScript works. Needs: …
Read →Monorepos
Read →Colocation
“colocation” is a pattern wherein you keep the query/mutation as close to the consuming component as possible. In many instances, it’s in the …
Read →Yarn-NPM
package.json resolutions field yarn specific Allows you to force the use of a particular version for a nested dependency. e.g.: 1 2 3 4 …
Read →Artificial Neural Network
Artificial Neural Network (ANN) Layers All learning occurs in the layers. In the image, below, there are three layers, but there could be only one, or many …
Read →The Structure and Interpretation of Computer Programs
Table of Contents Chapter 1 Predicates/Expressions Functions v. Procedures or Imperative v. Declarative Chapter 1 Predicates/Expressions Taking the following …
Read →Programming
The Structure and Interpretation of Computer Programs (SICP)
Read →