-
Deciding on a url schema gets tough when we begin to have heavily nested relationships of data.
-
When fetching heavily nested data wecan easily run into situations where we make to many http requests to get the data we need.
-
We are vulnerable to overfetching data.
The only way I've succeeded so far is to employ SSH.
Assuming you are new to this like me, first I'd like to share with you that your Mac has a SSH config file in a .ssh directory. The config file is where you draw relations of your SSH keys to each GitHub (or Bitbucket) account, and all your SSH keys generated are saved into .ssh directory by default. You can navigate to it by running cd ~/.ssh within your terminal, open the config file with any editor, and it should look something like this:
Host * AddKeysToAgent yes
> UseKeyChain yes
The only way I've succeeded so far is to employ SSH.
Assuming you are new to this like me, first I'd like to share with you that your Mac has a SSH config file in a .ssh directory. The config file is where you draw relations of your SSH keys to each GitHub (or Bitbucket) account, and all your SSH keys generated are saved into .ssh directory by default. You can navigate to it by running cd ~/.ssh within your terminal, open the config file with any editor, and it should look something like this:
Host * AddKeysToAgent yes
> UseKeyChain yes
- The
array.filtermethod which is a higher order function which means it takes a function as it's argument.
const someArray = ['😁', '💀', '💀', '💩', '💙', '😁', '💙'];
const getUniqueValues = (array) => (
array.filter((currentValue, index, arr) => (
arr.indexOf(currentValue) === index| class ArrayOfNumbers { | |
| constructor(public collection: number[]) {} | |
| get(index: number): number { | |
| return this.collection[index]; | |
| } | |
| } | |
| class ArrayOfStrings { | |
| constructor(public collection: string[]) {} | |
| get(index: number): string { |
You can store the TS compiler configuration in the file called tsconfig.json. You’ll usually add this file to the root directory of your project, together with the package.json.
When you launch the compiler, it reads the tsconfig.json from the folder you launched it from, to get the instructions about how to compile your project (e.g., which source files to compile, where to store the output, etc).
The compiler reads the tsconfig.json from the folder where you run it. Also, you can tell the compiler where to look for the config using the -p option:
tsc -p tsconfig.server.json
The structure of the tsconfig.json looks like this: