From f5fb2a6eeb28e73ed79e424b1d452cd286f2d319 Mon Sep 17 00:00:00 2001 From: Igor Matuszewski Date: Thu, 4 Apr 2024 22:57:53 +0200 Subject: [PATCH] refactor: Bring back children: Array for consistency --- crates/codegen/parser/runtime/src/napi_interface/cst.rs | 2 +- .../cargo/slang_solidity/src/generated/napi_interface/cst.rs | 2 +- crates/solidity/outputs/npm/package/src/generated/index.d.ts | 2 +- .../cargo/slang_testlang/src/generated/napi_interface/cst.rs | 2 +- crates/testlang/outputs/npm/package/src/generated/index.d.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/codegen/parser/runtime/src/napi_interface/cst.rs b/crates/codegen/parser/runtime/src/napi_interface/cst.rs index 0c8533c8ea..ca662ed502 100644 --- a/crates/codegen/parser/runtime/src/napi_interface/cst.rs +++ b/crates/codegen/parser/runtime/src/napi_interface/cst.rs @@ -58,7 +58,7 @@ impl RuleNode { (&self.0.text_len).into() } - #[napi(catch_unwind)] + #[napi(ts_return_type = "Array", catch_unwind)] pub fn children(&self) -> Vec> { self.0 .children diff --git a/crates/solidity/outputs/cargo/slang_solidity/src/generated/napi_interface/cst.rs b/crates/solidity/outputs/cargo/slang_solidity/src/generated/napi_interface/cst.rs index 5521e2222c..89fb62e1e5 100644 --- a/crates/solidity/outputs/cargo/slang_solidity/src/generated/napi_interface/cst.rs +++ b/crates/solidity/outputs/cargo/slang_solidity/src/generated/napi_interface/cst.rs @@ -60,7 +60,7 @@ impl RuleNode { (&self.0.text_len).into() } - #[napi(catch_unwind)] + #[napi(ts_return_type = "Array", catch_unwind)] pub fn children(&self) -> Vec> { self.0 .children diff --git a/crates/solidity/outputs/npm/package/src/generated/index.d.ts b/crates/solidity/outputs/npm/package/src/generated/index.d.ts index a1538afe4f..9d31b9bc2e 100644 --- a/crates/solidity/outputs/npm/package/src/generated/index.d.ts +++ b/crates/solidity/outputs/npm/package/src/generated/index.d.ts @@ -744,7 +744,7 @@ export namespace cst { get type(): NodeType.Rule; get kind(): kinds.RuleKind; get textLength(): text_index.TextIndex; - children(): Array; + children(): Array; createCursor(textOffset: text_index.TextIndex): cursor.Cursor; unparse(): string; } diff --git a/crates/testlang/outputs/cargo/slang_testlang/src/generated/napi_interface/cst.rs b/crates/testlang/outputs/cargo/slang_testlang/src/generated/napi_interface/cst.rs index 5521e2222c..89fb62e1e5 100644 --- a/crates/testlang/outputs/cargo/slang_testlang/src/generated/napi_interface/cst.rs +++ b/crates/testlang/outputs/cargo/slang_testlang/src/generated/napi_interface/cst.rs @@ -60,7 +60,7 @@ impl RuleNode { (&self.0.text_len).into() } - #[napi(catch_unwind)] + #[napi(ts_return_type = "Array", catch_unwind)] pub fn children(&self) -> Vec> { self.0 .children diff --git a/crates/testlang/outputs/npm/package/src/generated/index.d.ts b/crates/testlang/outputs/npm/package/src/generated/index.d.ts index a7fbd92472..4fa4bda6db 100644 --- a/crates/testlang/outputs/npm/package/src/generated/index.d.ts +++ b/crates/testlang/outputs/npm/package/src/generated/index.d.ts @@ -85,7 +85,7 @@ export namespace cst { get type(): NodeType.Rule; get kind(): kinds.RuleKind; get textLength(): text_index.TextIndex; - children(): Array; + children(): Array; createCursor(textOffset: text_index.TextIndex): cursor.Cursor; unparse(): string; }