bare-type-stripper 0.1.3 → 0.1.4
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 -2
- 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
|
@@ -750,9 +750,13 @@ bare_type_stripper__scan_type(const utf8_t *s, size_t n, size_t i, uint32_t term
|
|
|
750
750
|
|
|
751
751
|
// Type-level keywords that expect another type to follow. Marking these
|
|
752
752
|
// as 'op' keeps multi-line conditional types intact (e.g. 'T extends\n
|
|
753
|
-
// U ? A : B').
|
|
753
|
+
// U ? A : B'). 'as' covers both a chained cast ('x as unknown as {...}')
|
|
754
|
+
// and a mapped-type key remap ('{ [K in T as U]: V }'), where the type
|
|
755
|
+
// that follows may be an object literal whose '{' must be scanned as an
|
|
756
|
+
// operand rather than mistaken for the caller's terminating brace.
|
|
754
757
|
last_was_op =
|
|
755
|
-
(kl == 2 && memcmp(&s[ks], "is", 2) == 0
|
|
758
|
+
(kl == 2 && (memcmp(&s[ks], "is", 2) == 0 ||
|
|
759
|
+
memcmp(&s[ks], "as", 2) == 0)) ||
|
|
756
760
|
(kl == 5 && (memcmp(&s[ks], "infer", 5) == 0 ||
|
|
757
761
|
memcmp(&s[ks], "keyof", 5) == 0)) ||
|
|
758
762
|
(kl == 6 && memcmp(&s[ks], "typeof", 6) == 0) ||
|
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
|