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

fix: refactor the bindgen to use XtpNormalizedType #12

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mhmd-azeez
Copy link
Collaborator

@mhmd-azeez mhmd-azeez commented Nov 27, 2024

Fixes #10
Fixes #11

  • use XtpNormalizedType
  • print error messages when there is an exception

@@ -1,8 +1,18 @@
import ejs from "ejs";
import { getContext, helpers, Import, Export, Property, Schema, XtpSchema } from "@dylibso/xtp-bindgen";
import { getContext, helpers, Import, Export, Property, Schema, XtpSchema, XtpNormalizedType, ArrayType, BufferType, ObjectType, EnumType, MapType } from "@dylibso/xtp-bindgen";

function toPascalCase(s: string) {
Copy link
Contributor

Choose a reason for hiding this comment

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

should we move this to xtp-bindgen? i noticed we do have a snakeToPascal helper

Comment on lines +75 to +76
case "byte":
return "byte";
Copy link
Contributor

Choose a reason for hiding this comment

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

We're deprecating this so let's remove it. it's unused at the moment

Copy link
Contributor

@bhelx bhelx left a comment

Choose a reason for hiding this comment

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

A few comments, looks good though. thanks!

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.

error when no export function description is in schema Bindgen Refactor
2 participants