-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Introduce infra to publish stable types #20275
Commits on Nov 22, 2022
-
Avoid exposing
OWNER
from@glimmer/owner
There are pre-existing runtime shenanigans in `@ember/object/internals` to add debug-only errors to the class in dev builds. Those runtime shenanigans produce the need for type-level shenanigans to match: TS gets stuck here because the runtime shenanigans declare `FrameworkObject` with a class expression (rather than the usual class declaration form). That in turn means TS needs to be able to fully name the type produced by the clsas expression, which includes the `OWNER` symbol from `@glimmer/owner`. By explicitly giving the declaration a type when assigning it the class expression, instead of relying on inference, TS no longer needs to name the `OWNER` property key from the super class, eliminating the private name shenanigans. Co-authored-by: Dan Freeman <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9c4962b - Browse repository at this point
Copy the full SHA 9c4962bView commit details -
Refactor tsconfigs to share compiler options
This lets each config specify *only* how it actually does a build (or not!), while sharing the config explicitly. It also fixes an existing bug in the compilation settings which was not affecting *normal* TS compilation with `tsc`, but was generating noise in the `broccoli-typescript-compiler` pipeline because the packages happened to be resolved in a different order such that the `loader` "package" definition, and its declaration of the `require` module, was not present in the graph. Set it explicitly in `compilerOptiosn.paths` to fix that.
Configuration menu - View commit details
-
Copy full SHA for 4e62cd6 - Browse repository at this point
Copy the full SHA 4e62cd6View commit details -
Introduce a script to publish stable types
Provide a script which runs the compiler against a new tsconfig for generating types, wraps all the generated modules in `declare module` statements, and then creates an `index.d.ts` which uses side-effect style imports to expose them all, just the same as the preview types but generated from source. Critically, this infrastructure does not expose *any* stable types in and of itself. Instead, it introduces a list of all the types still in preview mode which acts as a filter, and currently *all* modules are in that filter. Stabilizing the types for a given module will mean removing modules from that list and removing the corresponding preview types definitions.
Configuration menu - View commit details
-
Copy full SHA for 845b60e - Browse repository at this point
Copy the full SHA 845b60eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 752f133 - Browse repository at this point
Copy the full SHA 752f133View commit details -
Update module-level documentation for preview types
Align the text with the module docs for the stable types, clarifying the updated current status.
Configuration menu - View commit details
-
Copy full SHA for 63e59ca - Browse repository at this point
Copy the full SHA 63e59caView commit details -
Configuration menu - View commit details
-
Copy full SHA for 24c0e4a - Browse repository at this point
Copy the full SHA 24c0e4aView commit details -
Configuration menu - View commit details
-
Copy full SHA for f37f561 - Browse repository at this point
Copy the full SHA f37f561View commit details -
Fix typo in internal comments for @ember/object
Co-authored-by: Dan Freeman <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7bef314 - Browse repository at this point
Copy the full SHA 7bef314View commit details -
Configuration menu - View commit details
-
Copy full SHA for 26a0923 - Browse repository at this point
Copy the full SHA 26a0923View commit details