Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jasonkuhrt
Copy link
Member

@jasonkuhrt jasonkuhrt commented May 25, 2020

This change introduces a TypeScript Langauge Service.

It needs to be used in the tsconfig like so:

{
  "compilerOptions": {
    "plugins": [{ "name": "nexus/typescript-language-service" }]
  },
}

Nexus will automate management of this config, ensuring:

  1. If present, that it is correctly configured
  2. If not present, added

Before / After this change:

  • Server

    server-before server-after
  • Settings

    settings-before settings-after
  • log

    log-before

    log-after

closes #...

TODO

  • docs
  • tests in the future, see comment below.
  • tsconfig automation

This change introduces a TypeScript Langauge Service.

It needs to be used in the tsconfig like so:

```ts
{
  "compilerOptions": {
    "plugins": [{ "name": "nexus/typescript-language-service" }]
  },
}
```

Nexus will automate management of this config, ensuring:

1. If present, that it is correctly configured
2. If not present, added
@jasonkuhrt jasonkuhrt requested a review from Weakky May 25, 2020 03:53
@jasonkuhrt jasonkuhrt added the type/feat Add a new capability or enhance an existing one label May 25, 2020
@jasonkuhrt
Copy link
Member Author

I'm not sure I'm going to test this. It's probably going to double the work needed for this PR. Because its so simple for now I think we can opt to revisit system testing with TS language server plugin later.

For docs we should mention what this plugin does in the project layout (which is where most of our tsconfig interop doc lives today)

Still have to write the tsconfig auto-management logic.

Copy link
Collaborator

@Weakky Weakky left a comment

Choose a reason for hiding this comment

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

That looks awesome, great work! 💯

@jasonkuhrt
Copy link
Member Author

🙏

In the end I'm skipping the tsconfig automation. Sticking to our current lint system. I'll open an issue about having Nexus actually write the tsconfig when it drifts from what it should be, rather than just warnings that users need to manually respond to. Basically what Nextjs is doing.

@jasonkuhrt jasonkuhrt changed the title feat(tsls): exclude autocompletions from private api feat(tslsp): exclude autocompletions from private api May 25, 2020
@jasonkuhrt jasonkuhrt merged commit 7d12eb3 into master May 25, 2020
@jasonkuhrt jasonkuhrt deleted the feat/tsls-no-private-nexus-api branch May 25, 2020 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/feat Add a new capability or enhance an existing one

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants