Skip to content

Commit

Permalink
Added typescript solution, part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Jess Morecroft committed Jan 12, 2021
1 parent ba37cd8 commit 7b190b2
Show file tree
Hide file tree
Showing 12 changed files with 3,362 additions and 0 deletions.
15 changes: 15 additions & 0 deletions part_2/typescript_solution/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"prettier/@typescript-eslint"
],

"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "prettier"],

"rules": {
"prettier/prettier": "error"
}
}
2 changes: 2 additions & 0 deletions part_2/typescript_solution/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build
node_modules
6 changes: 6 additions & 0 deletions part_2/typescript_solution/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"useTabs": false
}
17 changes: 17 additions & 0 deletions part_2/typescript_solution/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## TypeScript solution (Part 2)

This solution is functions only, no classes. We depend on two external libs at
runtime - fp-ts and heap. Our buy/sell queues are thus binary heaps this time,
which is vastly more performant that the old array slicing we were doing.

## Build tools

Install NPM and NodeJS v14 or above using [nvm](https://github.com/nvm-sh/nvm#installing-and-updating)

## Building and running the TypeScript solution

```
% npm install
% npm run build
% npm run test
```
Loading

0 comments on commit 7b190b2

Please sign in to comment.