Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocomplete issue with TS 5.0.2 #876

Open
wirekang opened this issue Feb 9, 2024 · 4 comments
Open

Autocomplete issue with TS 5.0.2 #876

wirekang opened this issue Feb 9, 2024 · 4 comments
Labels
bug Something isn't working typescript Related to Typescript

Comments

@wirekang
Copy link
Contributor

wirekang commented Feb 9, 2024

In Typescript 5.0.2, autocomplete is not working with certain form of selecting:

db.selectFrom("table").select((e) => [
  "", // HERE
]);

Type checking works well, only autocomplete(suggestion) is disabled.

ts kysely works?
5.0.2 0.27.2 X playground
5.0.2 0.27.1 X
5.0.2 0.27.0 X
5.0.2 0.26.3 X
5.0.2 0.26.2 O playground
5.0.2 0.26.1 O

This is probably an issue of Typescript itself since it's gone with latest version of Typescript:

ts kysely works?
5.3.3 0.27.2 O
5.3.3 0.27.1 O
5.3.3 0.27.0 O
5.3.3 0.26.3 O
5.3.3 0.26.2 O
5.3.3 0.26.1 O

But it would be great if Kysely has a type backward compatibility. I'm getting trouble with Monaco Editor because they are strongly bonded with fixed version of TS: current stable one is 5.0.2.

tsconfig.json

{
  "compilerOptions": {
    "strict": true,
    "noImplicitAny": true
  }
}
@wirekang
Copy link
Contributor Author

wirekang commented Feb 9, 2024

Looks like this commit is related.

@koskimas
Copy link
Member

koskimas commented Feb 9, 2024

The ironic thing is that that specific commit fixed the same issue for the newer typescript versions. These autocompletion things can't be automatically tested. Manually checking against a bunch of typescript versions is too much work.

@wirekang
Copy link
Contributor Author

Ok, it would be better to close this issue. I hate monaco editor.

@wirekang wirekang closed this as not planned Won't fix, can't repro, duplicate, stale Feb 15, 2024
@koskimas
Copy link
Member

I could try to figure out a way to support two versions: the latest and the one monaco is using. But I'm not sure I'll succeed. It was a shitload of trial and error to fix this for the latest versions already 😅

I'll reopen this for now.

@koskimas koskimas reopened this Feb 15, 2024
@igalklebanov igalklebanov added bug Something isn't working typescript Related to Typescript labels Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working typescript Related to Typescript
Projects
None yet
Development

No branches or pull requests

3 participants