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

Convert dedent.ts and tests to TypeScript #50

Closed
JoshuaKGoldberg opened this issue Jul 17, 2023 · 0 comments · Fixed by #51
Closed

Convert dedent.ts and tests to TypeScript #50

JoshuaKGoldberg opened this issue Jul 17, 2023 · 0 comments · Fixed by #51
Assignees
Labels
area: tooling Managing the repository's maintenance status: accepting prs Please, send a pull request to resolve this!

Comments

@JoshuaKGoldberg
Copy link
Collaborator

Splitting out from #36: I'm going to convert the main source files in this repo to TypeScript.

I would convert macro.js but it's not something I'm particularly familiar with. Will allow that to be a followup.

@JoshuaKGoldberg JoshuaKGoldberg added the area: tooling Managing the repository's maintenance label Jul 17, 2023
@JoshuaKGoldberg JoshuaKGoldberg self-assigned this Jul 17, 2023
@JoshuaKGoldberg JoshuaKGoldberg added the status: accepting prs Please, send a pull request to resolve this! label Jul 17, 2023
JoshuaKGoldberg added a commit that referenced this issue Jul 17, 2023
Fixes #50.

Integrates with a few tools:

* TypeScript itself for type checking (`yarn tsc`)
* [Babel's TypeScript
preset](https://babeljs.io/docs/babel-preset-typescript) to stick with
the existing output process (`yarn build:legacy`, `yarn build:modern`)
* [tsup](https://tsup.egoist.dev) to generate a single `.d.ts` from
`dedent.ts` (`yarn build:types`)

Types are moved from `index.d.ts` to `dist/dedent.d.ts` to match the
other `dist/*` files. I confirmed with [the `attw`
cli](https://github.com/arethetypeswrong/arethetypeswrong.github.io/tree/e33adb4d894b041a51b8366bf0611ff5ecaf38cb/packages/cli)
that these support various Node resolution strategies.

`macro.js` and `macro.d.ts` are untouched, per #50 -> #52.
JoshuaKGoldberg added a commit that referenced this issue Jul 25, 2023
`yarn test` is failing on `main` because I neglected to add this in #50.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: tooling Managing the repository's maintenance status: accepting prs Please, send a pull request to resolve this!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant