Skip to content

Commit 2e8f33d

Browse files
author
Yves
committed
Dynamically update the RETURN_TYPES
1 parent eb257d0 commit 2e8f33d

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

lib/asbind-instance/supported-ref-types.js

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -446,15 +446,8 @@ export const SUPPORTED_REF_TYPES = {
446446
};
447447

448448
// Our return type constant
449-
export const RETURN_TYPES = {
450-
NUMBER: "NUMBER",
451-
STRING: "STRING",
452-
INT8ARRAY: "INT8ARRAY",
453-
UINT8ARRAY: "UINT8ARRAY",
454-
INT16ARRAY: "INT16ARRAY",
455-
UINT16ARRAY: "UINT16ARRAY",
456-
INT32ARRAY: "INT32ARRAY",
457-
UINT32ARRAY: "UINT32ARRAY",
458-
FLOAT32ARRAY: "FLOAT32ARRAY",
459-
FLOAT64ARRAY: "FLOAT64ARRAY"
460-
};
449+
export const RETURN_TYPES = { NUMBER: "NUMBER" };
450+
451+
for (const refType of Object.keys(SUPPORTED_REF_TYPES)) {
452+
RETURN_TYPES[refType] = refType;
453+
}

0 commit comments

Comments
 (0)