-
Notifications
You must be signed in to change notification settings - Fork 47k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Brian Vaughn
committed
Sep 14, 2020
1 parent
dbf29c3
commit 6b06f41
Showing
7 changed files
with
156 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 78 additions & 0 deletions
78
packages/react-devtools-shell/src/app/InspectableElements/SymbolKeys.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @flow | ||
*/ | ||
|
||
import * as React from 'react'; | ||
|
||
const base = Object.create(Object.prototype, { | ||
enumerableStringBase: { | ||
value: 1, | ||
writable: true, | ||
enumerable: true, | ||
configurable: true, | ||
}, | ||
[Symbol('enumerableSymbolBase')]: { | ||
value: 1, | ||
writable: true, | ||
enumerable: true, | ||
configurable: true, | ||
}, | ||
nonEnumerableStringBase: { | ||
value: 1, | ||
writable: true, | ||
enumerable: false, | ||
configurable: true, | ||
}, | ||
[Symbol('nonEnumerableSymbolBase')]: { | ||
value: 1, | ||
writable: true, | ||
enumerable: false, | ||
configurable: true, | ||
}, | ||
}); | ||
|
||
const data = Object.create(base, { | ||
enumerableString: { | ||
value: 2, | ||
writable: true, | ||
enumerable: true, | ||
configurable: true, | ||
}, | ||
nonEnumerableString: { | ||
value: 3, | ||
writable: true, | ||
enumerable: false, | ||
configurable: true, | ||
}, | ||
[123]: { | ||
value: 3, | ||
writable: true, | ||
enumerable: true, | ||
configurable: true, | ||
}, | ||
[Symbol('nonEnumerableSymbol')]: { | ||
value: 2, | ||
writable: true, | ||
enumerable: false, | ||
configurable: true, | ||
}, | ||
[Symbol('enumerableSymbol')]: { | ||
value: 3, | ||
writable: true, | ||
enumerable: true, | ||
configurable: true, | ||
}, | ||
}); | ||
|
||
export default function SymbolKeys() { | ||
return <ChildComponent data={data} />; | ||
} | ||
|
||
function ChildComponent(props: any) { | ||
return null; | ||
} |