File tree Expand file tree Collapse file tree
compiler/packages/babel-plugin-react-compiler/src/Utils
packages/react-devtools-shared/src/devtools/views Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 */
77
88import * as t from '@babel/types' ;
9+ import { hasOwnProperty } from './utils' ;
910
1011export type ComponentDeclaration = t . FunctionDeclaration & {
1112 __componentDeclaration : boolean ;
@@ -14,7 +15,7 @@ export type ComponentDeclaration = t.FunctionDeclaration & {
1415export function isComponentDeclaration (
1516 node : t . FunctionDeclaration ,
1617) : node is ComponentDeclaration {
17- return Object . prototype . hasOwnProperty . call ( node , '__componentDeclaration' ) ;
18+ return hasOwnProperty ( node , '__componentDeclaration' ) ;
1819}
1920
2021export function parseComponentDeclaration (
Original file line number Diff line number Diff line change 66 */
77
88import * as t from '@babel/types' ;
9+ import { hasOwnProperty } from './utils' ;
910
1011export type HookDeclaration = t . FunctionDeclaration & {
1112 __hookDeclaration : boolean ;
@@ -14,7 +15,7 @@ export type HookDeclaration = t.FunctionDeclaration & {
1415export function isHookDeclaration (
1516 node : t . FunctionDeclaration ,
1617) : node is HookDeclaration {
17- return Object . prototype . hasOwnProperty . call ( node , '__hookDeclaration' ) ;
18+ return hasOwnProperty ( node , '__hookDeclaration' ) ;
1819}
1920
2021export function parseHookDeclaration (
Original file line number Diff line number Diff line change @@ -11,12 +11,10 @@ import escapeStringRegExp from 'escape-string-regexp';
1111import { meta } from '../../hydration' ;
1212import { formatDataForPreview } from '../../utils' ;
1313import isArray from 'react-devtools-shared/src/isArray' ;
14+ import hasOwnProperty from 'shared/hasOwnProperty' ;
1415
1516import type { HooksTree } from 'react-debug-tools/src/ReactDebugHooks' ;
1617
17- // $FlowFixMe[method-unbinding]
18- const hasOwnProperty = Object . prototype . hasOwnProperty ;
19-
2018export function alphaSortEntries (
2119 entryA : [ string , mixed ] ,
2220 entryB : [ string , mixed ] ,
You can’t perform that action at this time.
0 commit comments