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

feat: Add TS template #195

Merged
merged 1 commit into from
Feb 14, 2022
Merged

feat: Add TS template #195

merged 1 commit into from
Feb 14, 2022

Conversation

ospencer
Copy link
Contributor

@ospencer ospencer commented Feb 7, 2022

Closes #179

@ospencer ospencer self-assigned this Feb 7, 2022
@ospencer ospencer marked this pull request as ready for review February 13, 2022 08:40
Copy link
Contributor

@cohix cohix left a comment

Choose a reason for hiding this comment

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

looks good, just one question

export function run_e(payload: ArrayBuffer, ident: number) {
// Imports will be injected by the runtime
// @ts-ignore
setup(this.imports, ident);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do the imports need to be passed every time run_e is called?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That was done just to keep the library setup simple (instead of having separate setup functions for the imports and the ident). It's just doing one assignment, so no real performance hit. We can change that in a future version though.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, please file an issue for that change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ospencer ospencer merged commit f6d368b into main Feb 14, 2022
@ospencer ospencer deleted the oscar/ts-template branch February 14, 2022 15:38
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.

Split JS and TS languages
2 participants