Skip to content

Commit 86226b9

Browse files
committed
Fix bigint typing in codegen
1 parent aed75a4 commit 86226b9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

rust/bufferfish/src/compiler.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ fn get_typescript_type(ty: Type) -> String {
497497
=> {
498498
"number".to_string()
499499
},
500-
Some("u64") | Some("u128") | Some("i64") | Some("i128") => "BigInt".to_string(),
500+
Some("u64") | Some("u128") | Some("i64") | Some("i128") => "bigint".to_string(),
501501
Some("bool") => "boolean".to_string(),
502502
Some("String") => "string".to_string(),
503503
_ => path
@@ -630,13 +630,13 @@ fn get_bufferfish_fn(ty: Type) -> String {
630630
Some("u8") => "bf.readUint8() as number".to_string(),
631631
Some("u16") => "bf.readUint16() as number".to_string(),
632632
Some("u32") => "bf.readUint32() as number".to_string(),
633-
Some("u64") => "bf.readUint64() as BigInt".to_string(),
634-
Some("u128") => "bf.readUint128() as BigInt".to_string(),
633+
Some("u64") => "bf.readUint64() as bigint".to_string(),
634+
Some("u128") => "bf.readUint128() as bigint".to_string(),
635635
Some("i8") => "bf.readInt8() as number".to_string(),
636636
Some("i16") => "bf.readInt16() as number".to_string(),
637637
Some("i32") => "bf.readInt32() as number".to_string(),
638-
Some("i64") => "bf.readInt64() as BigInt".to_string(),
639-
Some("i128") => "bf.readInt128() as BigInt".to_string(),
638+
Some("i64") => "bf.readInt64() as bigint".to_string(),
639+
Some("i128") => "bf.readInt128() as bigint".to_string(),
640640
Some("bool") => "bf.readBool() as boolean".to_string(),
641641
Some("String") => "bf.readString() as string".to_string(),
642642
Some(custom) => format!("decode{custom}(bf)"),

0 commit comments

Comments
 (0)