@react-analyzer/core 0.0.2-next.1 → 0.0.3-next.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/dist/index.d.ts +3 -3
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -101,14 +101,14 @@ declare const isTruthyNumberType: (type: ts.Type) => boolean;
|
|
|
101
101
|
declare const isTruthyStringType: (type: ts.Type) => boolean;
|
|
102
102
|
declare const isUnknownType: (type: ts.Type) => boolean;
|
|
103
103
|
|
|
104
|
-
type
|
|
104
|
+
type TypeVariant = "any" | "bigint" | "boolean" | "enum" | "never" | "nullish" | "number" | "object" | "string" | "unknown" | "falsy bigint" | "falsy boolean" | "falsy number" | "falsy string" | "truthy bigint" | "truthy boolean" | "truthy number" | "truthy string";
|
|
105
105
|
/**
|
|
106
106
|
* Ported from https://github.com/typescript-eslint/typescript-eslint/blob/eb736bbfc22554694400e6a4f97051d845d32e0b/packages/eslint-plugin/src/rules/strict-boolean-expressions.ts#L826 with some enhancements
|
|
107
107
|
* Get the variants of an array of types.
|
|
108
108
|
* @param types The types to get the variants of
|
|
109
109
|
* @returns The variants of the types
|
|
110
110
|
*/
|
|
111
|
-
declare function getVariantsOfTypes(types: ts.Type[]): Set<
|
|
111
|
+
declare function getVariantsOfTypes(types: ts.Type[]): Set<TypeVariant>;
|
|
112
112
|
|
|
113
113
|
declare namespace isReactAPI {
|
|
114
114
|
type ReturnType = {
|
|
@@ -151,4 +151,4 @@ declare const isForwardRefCall: isReactAPICall.ReturnType;
|
|
|
151
151
|
declare const isMemoCall: isReactAPICall.ReturnType;
|
|
152
152
|
declare const isLazyCall: isReactAPICall.ReturnType;
|
|
153
153
|
|
|
154
|
-
export { type SemanticEntry, type SemanticNode, type
|
|
154
|
+
export { type SemanticEntry, type SemanticNode, type TypeVariant, getVariantsOfTypes, isAnyType, isBigIntType, isBooleanType, isCaptureOwnerStack, isCaptureOwnerStackCall, isChildrenCount, isChildrenCountCall, isChildrenForEach, isChildrenForEachCall, isChildrenMap, isChildrenMapCall, isChildrenOnly, isChildrenOnlyCall, isChildrenToArray, isChildrenToArrayCall, isCloneElement, isCloneElementCall, isCreateContext, isCreateContextCall, isCreateElement, isCreateElementCall, isCreateRef, isCreateRefCall, isEnumType, isFalsyBigIntType, isFalsyNumberType, isFalsyStringType, isForwardRef, isForwardRefCall, isLazy, isLazyCall, isMemo, isMemoCall, isNeverType, isNullishType, isNumberType, isObjectType, isReactAPI, isReactAPICall, isStringType, isTruthyBigIntType, isTruthyNumberType, isTruthyStringType, isUnknownType };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-analyzer/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3-next.2",
|
|
4
4
|
"description": "React Analyzer utility module for static analysis of React core APIs and patterns.",
|
|
5
5
|
"homepage": "https://github.com/Rel1cx/react-analyzer",
|
|
6
6
|
"bugs": {
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
"./package.json"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"ts-pattern": "^5.
|
|
31
|
-
"@react-analyzer/
|
|
32
|
-
"@react-analyzer/eff": "0.0.
|
|
33
|
-
"@react-analyzer/
|
|
30
|
+
"ts-pattern": "^5.8.0",
|
|
31
|
+
"@react-analyzer/ast": "0.0.3-next.2",
|
|
32
|
+
"@react-analyzer/eff": "0.0.3-next.2",
|
|
33
|
+
"@react-analyzer/kit": "0.0.3-next.2"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@tsconfig/node22": "^22.0.2",
|
|
37
|
-
"@types/node": "^24.
|
|
37
|
+
"@types/node": "^24.2.1",
|
|
38
38
|
"tsup": "^8.5.0",
|
|
39
39
|
"type-fest": "^4.41.0",
|
|
40
40
|
"@local/configs": "0.0.0"
|