Skip to content

Improve generated type defininitions for ASModule #1510

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

Merged
merged 2 commits into from
Oct 16, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -600,24 +600,24 @@ export class TSDBuilder extends ExportsWalker {
sb.push(" type i8 = number;\n");
sb.push(" type i16 = number;\n");
sb.push(" type i32 = number;\n");
sb.push(" type i64 = BigInt;\n");
sb.push(" type i64 = bigint;\n");
if (isWasm64) {
sb.push(" type isize = BigInt;\n");
sb.push(" type isize = bigint;\n");
} else {
sb.push(" type isize = number;\n");
}
sb.push(" type u8 = number;\n");
sb.push(" type u16 = number;\n");
sb.push(" type u32 = number;\n");
sb.push(" type u64 = BigInt;\n");
sb.push(" type u64 = bigint;\n");
if (isWasm64) {
sb.push(" type usize = BigInt;\n");
sb.push(" type usize = bigint;\n");
} else {
sb.push(" type usize = number;\n");
}
sb.push(" type f32 = number;\n");
sb.push(" type f64 = number;\n");
sb.push(" type bool = any;\n");
sb.push(" type bool = boolean | number;\n");
++this.indentLevel;
this.walk();
--this.indentLevel;
Expand Down