Skip to content

Commit 27ad000

Browse files
committed
Fix build errors. This deduplicates struct definitions that were inlined into our copy of the JSI code.
1 parent 4e73539 commit 27ad000

4 files changed

Lines changed: 2 additions & 241 deletions

File tree

Core/Node-API-JSI/Include/napi/napi.h

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,14 @@
11
#pragma once
22

33
#include <jsi/jsi.h>
4+
#include <napi/js_native_api_types.h>
45
#include <functional>
56
#include <initializer_list>
67
#include <memory>
78
#include <string>
89
#include <vector>
910
#include <optional>
1011

11-
// Copied from js_native_api_types.h (https://git.io/J8aI5)
12-
typedef enum {
13-
napi_default = 0,
14-
napi_writable = 1 << 0,
15-
napi_enumerable = 1 << 1,
16-
napi_configurable = 1 << 2,
17-
} napi_property_attributes;
18-
19-
typedef enum {
20-
// ES6 types (corresponds to typeof)
21-
napi_undefined,
22-
napi_null,
23-
napi_boolean,
24-
napi_number,
25-
napi_string,
26-
napi_symbol,
27-
napi_object,
28-
napi_function,
29-
napi_external,
30-
} napi_valuetype;
31-
32-
typedef enum {
33-
napi_int8_array,
34-
napi_uint8_array,
35-
napi_uint8_clamped_array,
36-
napi_int16_array,
37-
napi_uint16_array,
38-
napi_int32_array,
39-
napi_uint32_array,
40-
napi_float32_array,
41-
napi_float64_array,
42-
// JSI doesn't support bigint.
43-
// napi_bigint64_array,
44-
// napi_biguint64_array,
45-
} napi_typedarray_type;
46-
4712
struct napi_env__ {
4813
napi_env__(facebook::jsi::Runtime& rt)
4914
: rt{rt}

Tests/NodeApi/child_process_mac.cpp

Lines changed: 0 additions & 166 deletions
This file was deleted.

Tests/NodeApi/node_lite.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <array>
88
#include <cstdarg>
99
#include <cstdlib>
10+
#include <cstring>
1011
#include <filesystem>
1112
#include <fstream>
1213
#include <iostream>

Tests/NodeApi/node_lite_mac.cpp

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)