fix(napi-derive): incorrect Task output type in some cases (#1466)

This commit is contained in:
LongYinan 2023-01-31 20:10:04 +08:00 committed by GitHub
parent 9506e3fb14
commit 3158cb058f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,7 +37,7 @@ impl ToTypeDef for NapiImpl {
if let Some(output_type) = &self.task_output_type { if let Some(output_type) = &self.task_output_type {
TASK_STRUCTS.with(|t| { TASK_STRUCTS.with(|t| {
t.borrow_mut().insert( t.borrow_mut().insert(
self.js_name.clone(), self.name.to_string(),
ty_to_ts_type(output_type, false, true).0, ty_to_ts_type(output_type, false, true).0,
); );
}); });