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

Seperate type and normal imports #305

Merged
merged 1 commit into from Apr 4, 2022
Merged

Conversation

JeremyMoeglich
Copy link
Contributor

This commit separates imports like

import { Message, MessageAttachment, MessageHeaders } from './message';

to

import type { MessageAttachment, MessageHeaders } from './message';
import { Message } from './message';

this is needed to not throw an Error when using the typescript compiler options:
"preserveValueImports",
"isolatedModules"

@zackschuster
Copy link
Collaborator

i'd toyed with this in the past, but it raised issues downstream. the main rub is that this raises the minimum required version of typescript to 3.8.

@eleith it's been two years, so perhaps we're safe in using this feature now without it being breaking? or we can take the chance to bump to 4.0 with other changes (min. node 12, etc)?

@eleith
Copy link
Owner

eleith commented Apr 4, 2022

i'm not sure how to evaluate typescript version adoption. with that said, personally, i'ld be up for a major version change to increase our min node and typescript versions.

@zackschuster
Copy link
Collaborator

zackschuster commented Apr 4, 2022

i agree. i'll merge this and work on the remaining tasks for closing #292.

@zackschuster zackschuster merged commit 9d5b537 into eleith:main Apr 4, 2022
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.

None yet

3 participants