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

[Experimental] Add Typekit for @typespec/http #5340

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

joheredi
Copy link
Member

This PR includes:

  • Consolidating the format used to define Typekits
  • Adding @typespec/compiler/experimental/typekit sub export
  • Adding @typespec/http/experimental/typekit sub export and implementation

Note: experimental/typekit subpaths were added for improved UX. The typekit import has a side effect which is augmenting existing typekit so having it within its own export isolates the side effect and makes it easier consumers to migrate once it becomes stable into @typespec/compiler/typekit and @typespec/http/typekit respectively

@azure-sdk
Copy link
Collaborator

azure-sdk commented Dec 12, 2024

All changed packages have been documented.

  • @typespec/compiler
  • @typespec/http
Show changes

@typespec/compiler - feature ✏️

Add Experimental Typekit helpers for @typespec/http

@typespec/http - feature ✏️

Add Experimental Typekit helpers for @typespec/http

@azure-sdk
Copy link
Collaborator

azure-sdk commented Dec 12, 2024

You can try these changes here

🛝 Playground 🌐 Website 📚 Next docs 🛝 VSCode Extension

@markcowl markcowl removed their assignment Jan 9, 2025
@witemple-msft
Copy link
Member

What does a library consumer need to do to activate the new typekit functionality? I am a little weirded out that there doesn't seem to be any import from experimental/typekit from the HTTP library in the tests, so are these new typekits activated automatically on any import of @typespec/http? i also don't see the experimental export path from the HTTP library, only the compiler core.

I think this change is righteous, just want to make sure we have the consumption pattern nailed down for these experimental APIs.

I also worry a little bit about discoverability and how someone is meant to know that import "@typespec/http/experimental/typekit"; ought to be required for its side effects alone to make these extensions available. In the compiler core, you actually have to import $ from the side-effecting path, but here there won't be anything to import, you'll just import nothing from the module and it'll change the behavior of $. Do I have all this right?

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.

5 participants