Skip to content

Commit 6407f10

Browse files
committed
[Flight] Support classes in renderDebugModel (facebook#33590)
This adds better support for serializing class instances as Debug values. It adds a new marker on the object `{ "": "$P...", ... }` which indicates which constructor's prototype to use for this object's prototype. It doesn't encode arbitrary prototypes and it doesn't encode any of the properties on the prototype. It might get some of the properties from the prototype by virtue of `toString` on a `class` constructor will include the whole class's body. This will ensure that the instance gets the right name in logs. Additionally, this now also invokes getters if they're enumerable on the prototype. This lets us reify values that can only be read from native classes. --------- Co-authored-by: Hendrik Liebau <[email protected]> DiffTrain build for [18ee505](facebook@18ee505)
1 parent 14213c5 commit 6407f10

File tree

69 files changed

+263657
-145087
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+263657
-145087
lines changed

compiled/babel-plugin-react-refresh/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
*
77
* This source code is licensed under the MIT license found in the
88
* LICENSE file in the root directory of this source tree.
9+
*
10+
* @noformat
11+
* @nolint
12+
* @lightSyntaxTransform
13+
* @preventMunge
14+
* @oncall react_core
915
*/
1016

1117
"use strict";

compiled/eslint-plugin-react-hooks/index.js

Lines changed: 64321 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)