Modify some non-standard problems on TS side

Description
    1. Modify incorrect export in cpp file
    2. Delete invalid parameters
    3. Add TS constraint type to the variable
    4. Add braces to some if judgments
    5. Package the same part of the code
    #I52Q2E:Modify some non-standard problems on TS side

Signed-off-by: wangyong1995626wywz <wangyong237@huawei.com>
This commit is contained in:
wangyong1995626wywz
2022-04-14 15:09:18 +08:00
parent 5efd85e12d
commit 71f194f508
30 changed files with 1125 additions and 998 deletions
@@ -56,7 +56,7 @@ static napi_module plainArrayModule = {
.nm_flags = 0,
.nm_filename = nullptr,
.nm_register_func = PlainArrayInit,
.nm_modname = "PlainArray",
.nm_modname = "util.PlainArray",
.nm_priv = ((void*)0),
.reserved = { 0 },
};
@@ -65,4 +65,4 @@ extern "C" __attribute__ ((constructor)) void RegisterModule()
{
napi_module_register(&plainArrayModule);
}
}
} // namespace OHOS::Util