-
Notifications
You must be signed in to change notification settings - Fork 283
Remove the magic program from Typekits #7018
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
Remove the magic program from Typekits #7018
Conversation
… to support accessing an instantiated Typekit in EF components
…t to instantiated Typekit
packages/emitter-framework/src/typescript/components/interface-declaration.tsx
Outdated
Show resolved
Hide resolved
.chronus/changes/typekits-no-magic-program-2025-3-16-16-33-41.md
Outdated
Show resolved
Hide resolved
packages/emitter-framework/src/typescript/components/type-alias-declaration.tsx
Outdated
Show resolved
Hide resolved
All changed packages have been documented.
Show changes
|
You can try these changes here
|
Probably need also a typespec-azure pr before |
Yep, it's here: Azure/typespec-azure#2550 |
Depends on microsoft/typespec#7018 --------- Co-authored-by: Christopher Radek <Christopher.Radek@microsoft.com>
Fixes #6789
This builds off of the POC PR #6865 from @joheredi
In short, this PR gets rid of the default typekit (e.g. being able to use
$.api
without passing in aprogram
). Now it is required to first pass in a TypeSpecprogram
orrealm
before calling Typekits (e.g.$(program).api
)To reduce friction for emitter authors, the
emitter-framework
package exposes theuseTsp()
hook which returns a typekit that's been instantiated with aprogram
. Also included anOutput
component that accepts aprogram
so that the new context provider doesn't need to be manually created.ToDo: