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

Setup TypeScript Infra #272

Merged
merged 3 commits into from
Dec 27, 2023
Merged

Conversation

NullVoxPopuli
Copy link
Contributor

@NullVoxPopuli NullVoxPopuli commented Dec 23, 2023

As ember has first-class TypeScript support out of the box (almost), we need to to have all core addons also support that.

Like always, consumers don't need to use TypeScript, but our library code using TypeScript will provide better intellisense for both JavaScript and TypeScript users.

Incidentally, achieving more alignment with the TS-v2-addon blueprint, we gain support for Glint-using projects.

This work lays foundation for the work of #246 so that the diff can be smaller.

Main changes:

  • updates project layout to match a --typescript using v2 addon blueprint
  • test-types project using standards expect-type for quick boundary types checking
  • minimal interface specification so that most of the TS conversion may happen separately (the bulk of feat: typescript #246, for example)
    • that future second PR will also include glint-type checking.
  • typechecking matrix, ensuring that ember-page-title is supported across a wide range of typescript versions.

@knownasilya
Copy link
Contributor

Guess I should close me pr

@NullVoxPopuli
Copy link
Contributor Author

I will be borrowing basically everything from that pr! Thank you @knownasilya 🙏

@NullVoxPopuli NullVoxPopuli changed the title Convert to TypeScript Setup TypeScript Dec 24, 2023
Woo type errors, deprecations!

Add test-types project

Rename files

Upgrade and install updated lint config / dependencies

Add test script to test-types

Update more deps
@NullVoxPopuli NullVoxPopuli force-pushed the add-types branch 2 times, most recently from 8a7e6be to f0084f4 Compare December 26, 2023 17:10
@NullVoxPopuli NullVoxPopuli changed the title Setup TypeScript Setup TypeScript Infra Dec 26, 2023
…resolve correctly in monorepos when also installed as a devDependency, so we need to use the injected feature to remove the devDependencies for the consumed version of the addon
@NullVoxPopuli NullVoxPopuli marked this pull request as ready for review December 26, 2023 17:25
Copy link
Contributor

@knownasilya knownasilya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovely!

@knownasilya knownasilya merged commit 44f009f into ember-cli:master Dec 27, 2023
22 checks passed
@NullVoxPopuli NullVoxPopuli deleted the add-types branch December 27, 2023 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants