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

fix(test-utils): allow unknown initialization options and expose locale option #142

Merged
merged 2 commits into from Feb 28, 2024

Conversation

remcohaszing
Copy link
Member

This allows people to load TypeScript as suggested in #140. Since initializationOptions is of type any there, it doesn’t really matter. But the InitializationOptions interface is used by the test utils and prohibits the user from passing additional properties.

Also it’s nice if all Volar based language servers that do allow the client to pass the TypeScript SDK, do so in a consistent manner.

remcohaszing and others added 2 commits February 26, 2024 13:50
This allows people to load TypeScript as suggested in #140. Since
`initializationOptions` is of type `any` there, it doesn’t really
matter. But the `InitializationOptions` interface is used by the test
utils and prohibits the user from passing additional properties.

Also it’s nice if all Volar based language servers that do allow the
client to pass the TypeScript SDK, do so in a consistent manner.
@johnsoncodehk
Copy link
Member

johnsoncodehk commented Feb 28, 2024

Thanks! I modified the API to accept unknown properties. Also corrected is that locale should be a property of InitializeParams instead of InitializeParams.initializationOptions.

I think whether to keep typescript.tsdk as an optional convention needs to be discussed first, so I temporarily reverted the changes to the initializationOptions interface.

@johnsoncodehk johnsoncodehk changed the title fix(language-server): add typescript and locale initialization options fix(test-utils): allow any initialization option properties and expose locale option Feb 28, 2024
@johnsoncodehk johnsoncodehk changed the title fix(test-utils): allow any initialization option properties and expose locale option fix(test-utils): allow unknown initialization options and expose locale option Feb 28, 2024
@johnsoncodehk johnsoncodehk merged commit d7c5516 into master Feb 28, 2024
6 checks passed
@johnsoncodehk johnsoncodehk deleted the restore-typescript-initialization-option branch February 28, 2024 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants