File tree Expand file tree Collapse file tree 6 files changed +8
-7
lines changed
Expand file tree Collapse file tree 6 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 11# ` .name() => String|null `
22
33Returns the name of the current node of this wrapper. If it's a composite component, this will be
4- the name of the component. If it's native DOM node, it will be a string of the tag name. If it's
4+ the name of the component. If it's a native DOM node, it will be a string of the tag name. If it's
55` null ` , it will be ` null ` .
66
77The order of precedence on returning the name is: ` type.displayName ` -> ` type.name ` -> ` type ` .
Original file line number Diff line number Diff line change 11# ` .type() => String|Function `
22
33Returns the type of the current node of this wrapper. If it's a composite component, this will be
4- the component constructor. If it's native DOM node, it will be a string of the tag name.
4+ the component constructor. If it's a native DOM node, it will be a string of the tag name.
55
66Note: can only be called on a wrapper of a single node.
77
Original file line number Diff line number Diff line change 11# ` .name() => String|null `
22
33Returns the name of the current node of this wrapper. If it's a composite component, this will be
4- the name of the top-most rendered component. If it's native DOM node, it will be a string of the
4+ the name of the top-most rendered component. If it's a native DOM node, it will be a string of the
55tag name. If it's ` null ` , it will be ` null ` .
66
77The order of precedence on returning the name is: ` type.displayName ` -> ` type.name ` -> ` type ` .
Original file line number Diff line number Diff line change 11# ` .type() => String|Function|null `
22
33Returns the type of the current node of this wrapper. If it's a composite component, this will be
4- the component constructor. If it's native DOM node, it will be a string of the tag name. If it's ` null ` , it will be ` null ` .
4+ the component constructor. If it's a native DOM node, it will be a string of the tag name. If it's ` null ` , it will be ` null ` .
55
66Note: can only be called on a wrapper of a single node.
77
Original file line number Diff line number Diff line change @@ -192,7 +192,7 @@ Calls `.forceUpdate()` on the root component instance.
192192#### [ ` .debug() => String ` ] ( ShallowWrapper/debug.md )
193193Returns a string representation of the current shallow render tree for debugging purposes.
194194
195- #### [ ` .type() => String|Function ` ] ( ShallowWrapper/type.md )
195+ #### [ ` .type() => String|Function|null ` ] ( ShallowWrapper/type.md )
196196Returns the type of the current node of the wrapper.
197197
198198#### [ ` .name() => String ` ] ( ShallowWrapper/name.md )
Original file line number Diff line number Diff line change @@ -852,9 +852,10 @@ class ShallowWrapper {
852852
853853 /**
854854 * Returns the type of the current node of this wrapper. If it's a composite component, this will
855- * be the component constructor. If it's a native DOM node, it will be a string.
855+ * be the component constructor. If it's a native DOM node, it will be a string of the tag name.
856+ * If it's null, it will be null.
856857 *
857- * @returns {String|Function }
858+ * @returns {String|Function|null }
858859 */
859860 type ( ) {
860861 return this . single ( 'type' , typeOfNode ) ;
You can’t perform that action at this time.
0 commit comments