Skip to content
This repository has been archived by the owner on Oct 4, 2022. It is now read-only.

Convert backend to TS #2

Merged
merged 3 commits into from Oct 25, 2020
Merged

Convert backend to TS #2

merged 3 commits into from Oct 25, 2020

Conversation

Tebro
Copy link
Contributor

@Tebro Tebro commented Oct 19, 2020

No description provided.

Copy link
Owner

@mawburn mawburn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty straightforward, but we should inherit the tsconfig from root.

@@ -0,0 +1,70 @@
{
Copy link
Owner

@mawburn mawburn Oct 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With a monorepo we should be inheriting from the base tsconfig.json file in the project, then extending that where needed.

https://github.com/Portaler-Zone/portaler-core/blob/main/packages/frontend/tsconfig.json

This actually just started as:

{
  "extends": "../../tsconfig.json",
}

But when I ran it for the first time I think CRA or maybe TS gave some kind of message I didn't quite catch before it went away and it added the rest of the file.

{
  "extends": "../../tsconfig.json",
  "compilerOptions": {},
  "include": [
    "src"
  ]
}

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might mean we need to move some of the JSX or Node specific configs into the individual packages, I've never done a Node TS repo before, but that should be easy enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get "unknown compiler option" for "extends".

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'll take a look at this after work. I actually ran into the same issue but I thought I fixed it. I forget exactly what it was, but it was something stupid.

@mawburn
Copy link
Owner

mawburn commented Oct 25, 2020

So, the server wasn't actually working when trying to hook it into discord. I put it back to the original way and just converted that to TS, but also so that @mmcken3 can learn better JS/TS practices too.

@mawburn mawburn merged commit f876156 into main Oct 25, 2020
@mawburn mawburn deleted the typescript-api branch October 25, 2020 00:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants