You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/compiler/checker.ts
+19-13Lines changed: 19 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -10870,17 +10870,22 @@ namespace ts {
10870
10870
}
10871
10871
10872
10872
/**
10873
-
* Given React element instance type and the class type, resolve the Jsx type
10874
-
* Pass elemType to handle individual type in the union typed element type.
10875
-
*/
10876
-
function getResolvedJsxType(node: JsxOpeningLikeElement, elemType?: Type, elemClassType?: Type): Type {
10873
+
* Resolve attributes type of the given node. The function is intended to initally be called from getJsxElementAttributesType which already handle JSX-intrinsic-element.
10874
+
* @param node a non-instrinsic JSXOPeningLikeElement
10875
+
* @param elemType an instance type of the given node
10876
+
* @param elemClassType a JSX-ElementClass type. This is a result of looking up ElementClass interface in the JSX global (imported from react.d.ts)
10877
+
* @return attributes'type if able to resolve the type of node
10878
+
* anyType if there is no type ElementAttributesProperty or there is an error
10879
+
* emptyObjectType if there is no "prop" in the element instance type
10880
+
**/
10881
+
function resolveJsxElementAttributesType(node: JsxOpeningLikeElement, elemType?: Type, elemClassType?: Type): Type {
Copy file name to clipboardExpand all lines: src/compiler/types.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2363,7 +2363,7 @@ namespace ts {
2363
2363
isVisible?: boolean;// Is this node visible
2364
2364
hasReportedStatementInAmbientContext?: boolean;// Cache boolean if we report statements in ambient context
2365
2365
jsxFlags?: JsxFlags;// flags for knowing what kind of element/attributes we're dealing with
2366
-
resolvedJsxType?: Type;// resolved element attributes type of a JSX openinglike element
2366
+
resolvedJsxElementAttributesType?: Type;// resolved element attributes type of a JSX openinglike element
2367
2367
hasSuperCall?: boolean;// recorded result when we try to find super-call. We only try to find one if this flag is undefined, indicating that we haven't made an attempt.
2368
2368
superCall?: ExpressionStatement;// Cached first super-call found in the constructor. Used in checking whether super is called before this-accessing
2369
2369
switchTypes?: Type[];// Cached array of switch case expression types
0 commit comments