bare-type-stripper 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/strip.h +6 -3
- package/package.json +1 -1
- package/prebuilds/android-arm/bare-type-stripper.bare +0 -0
- package/prebuilds/android-arm/bare-type-stripper.node +0 -0
- package/prebuilds/android-arm64/bare-type-stripper.bare +0 -0
- package/prebuilds/android-arm64/bare-type-stripper.node +0 -0
- package/prebuilds/android-ia32/bare-type-stripper.bare +0 -0
- package/prebuilds/android-ia32/bare-type-stripper.node +0 -0
- package/prebuilds/android-x64/bare-type-stripper.bare +0 -0
- package/prebuilds/android-x64/bare-type-stripper.node +0 -0
- package/prebuilds/darwin-arm64/bare-type-stripper.bare +0 -0
- package/prebuilds/darwin-arm64/bare-type-stripper.node +0 -0
- package/prebuilds/darwin-x64/bare-type-stripper.bare +0 -0
- package/prebuilds/darwin-x64/bare-type-stripper.node +0 -0
- package/prebuilds/ios-arm64/bare-type-stripper.bare +0 -0
- package/prebuilds/ios-arm64-simulator/bare-type-stripper.bare +0 -0
- package/prebuilds/ios-x64-simulator/bare-type-stripper.bare +0 -0
- package/prebuilds/linux-arm64/bare-type-stripper.bare +0 -0
- package/prebuilds/linux-arm64/bare-type-stripper.node +0 -0
- package/prebuilds/linux-x64/bare-type-stripper.bare +0 -0
- package/prebuilds/linux-x64/bare-type-stripper.node +0 -0
- package/prebuilds/win32-arm64/bare-type-stripper.bare +0 -0
- package/prebuilds/win32-arm64/bare-type-stripper.node +0 -0
- package/prebuilds/win32-x64/bare-type-stripper.bare +0 -0
- package/prebuilds/win32-x64/bare-type-stripper.node +0 -0
package/lib/strip.h
CHANGED
|
@@ -707,10 +707,12 @@ bare_type_stripper__scan_type(const utf8_t *s, size_t n, size_t i, uint32_t term
|
|
|
707
707
|
// as 'op' keeps multi-line conditional types intact (e.g. 'T extends\n
|
|
708
708
|
// U ? A : B').
|
|
709
709
|
last_was_op =
|
|
710
|
+
(kl == 2 && memcmp(&s[ks], "is", 2) == 0) ||
|
|
710
711
|
(kl == 5 && (memcmp(&s[ks], "infer", 5) == 0 ||
|
|
711
712
|
memcmp(&s[ks], "keyof", 5) == 0)) ||
|
|
712
713
|
(kl == 6 && memcmp(&s[ks], "typeof", 6) == 0) ||
|
|
713
|
-
(kl == 7 && memcmp(&s[ks], "extends", 7) == 0
|
|
714
|
+
(kl == 7 && (memcmp(&s[ks], "extends", 7) == 0 ||
|
|
715
|
+
memcmp(&s[ks], "asserts", 7) == 0));
|
|
714
716
|
seen_token = true;
|
|
715
717
|
continue;
|
|
716
718
|
}
|
|
@@ -1079,8 +1081,9 @@ bare_type_stripper__process_class_body(bare_type_stripper_t *ctx, size_t *result
|
|
|
1079
1081
|
size_t peek = bare_type_stripper__skip_trivia(s, n, ke);
|
|
1080
1082
|
|
|
1081
1083
|
// Erase modifier only if followed by another identifier (member name
|
|
1082
|
-
// or another modifier), '[' (computed name),
|
|
1083
|
-
|
|
1084
|
+
// or another modifier), '#' (private name), '[' (computed name), '*'
|
|
1085
|
+
// (generator), or a string or numeric member name.
|
|
1086
|
+
if (peek < n && (ids(s[peek]) || s[peek] == '#' || s[peek] == '[' || s[peek] == '*' || s[peek] == '\'' || s[peek] == '"' || (s[peek] >= '0' && s[peek] <= '9'))) {
|
|
1084
1087
|
uint32_t flags = member_strip_seen ? 0 : bare_type_stripper_semi;
|
|
1085
1088
|
|
|
1086
1089
|
err = bare_type_stripper__add_range_flags(ctx, ks, peek, flags);
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|