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

js: Add type templates #62

Merged
merged 7 commits into from
Feb 24, 2025
Merged

js: Add type templates #62

merged 7 commits into from
Feb 24, 2025

Conversation

svix-jplatte
Copy link
Member

almost working. I've explained @svix-lucho the state of things so this can be finished while I'm away.

Reflected in svix/svix-webhooks#1700.

@svix-mman svix-mman force-pushed the jplatte/js-type-tpl branch 4 times, most recently from 4beca9d to f0d09e8 Compare February 19, 2025 15:45
@svix-mman
Copy link
Contributor

Open source review

biome Javascript/Typescript formatter

Main advantage over prettier, biome can remove unused imports.

  • Dual license Apache-2.0 / MIT
  • Written in Rust
  • Very fast

@svix-mman svix-mman force-pushed the jplatte/js-type-tpl branch 2 times, most recently from 2082dc0 to 3ce926a Compare February 19, 2025 19:01
@svix-mman svix-mman marked this pull request as ready for review February 19, 2025 20:07
@svix-mman svix-mman requested a review from a team as a code owner February 19, 2025 20:07
@svix-mman
Copy link
Contributor

Don't merge, waiting for Jonas to review

Comment on lines 13 to 15
{% else -%}
{# technically a compiler error :) #}
compile_error!("{{ type.kind }} types are not supported by this codegen template");
Copy link
Member Author

@svix-jplatte svix-jplatte Feb 24, 2025

Choose a reason for hiding this comment

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

Copy-paste from Rust, I'd rather not have it like this. Although if there's a TS equivalent, would be nice to add.

Suggested change
{% else -%}
{# technically a compiler error :) #}
compile_error!("{{ type.kind }} types are not supported by this codegen template");

Copy link
Contributor

Choose a reason for hiding this comment

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

Still technically a compiler error :)

src/example.ts:1:1 - error TS2304: Cannot find name 'compile_error'.

1 compile_error!("{{ type.kind }} types are not supported by this codegen template");
  ~~~~~~~~~~~~~

@svix-jplatte svix-jplatte merged commit 139e119 into main Feb 24, 2025
3 checks passed
@svix-jplatte svix-jplatte deleted the jplatte/js-type-tpl branch February 24, 2025 11:48
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.

2 participants