Skip to content

Commit

Permalink
gen
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbastian committed Nov 22, 2023
1 parent 9a61706 commit 2d9bfee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion feature_tests/js/api/BorrowedFields.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions tool/src/js/structs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -500,9 +500,10 @@ pub fn gen_ts_type<W: fmt::Write>(
return Ok(opt);
}
ast::TypeName::Writeable => unreachable!(),
ast::TypeName::StrReference(_, ast::StringEncoding::UnvalidatedUtf8 | ast::StringEncoding::UnvalidatedUtf16) => {
out.write_str("string")?
}
ast::TypeName::StrReference(
_,
ast::StringEncoding::UnvalidatedUtf8 | ast::StringEncoding::UnvalidatedUtf16,
) => out.write_str("string")?,
ast::TypeName::PrimitiveSlice(.., prim) => match prim {
ast::PrimitiveType::i8 => write!(out, "Int8Array")?,
ast::PrimitiveType::u8 => write!(out, "Uint8Array")?,
Expand Down

0 comments on commit 2d9bfee

Please sign in to comment.