@@ -18,6 +18,7 @@ export const enum Hooks {
1818 GET_COMPONENT_ROOT_ELEMENTS = 'getComponentRootElements' ,
1919 EDIT_COMPONENT_STATE = 'editComponentState' ,
2020 GET_COMPONENT_DEVTOOLS_OPTIONS = 'getAppDevtoolsOptions' ,
21+ GET_COMPONENT_RENDER_CODE = 'getComponentRenderCode' ,
2122 INSPECT_TIMELINE_EVENT = 'inspectTimelineEvent' ,
2223 GET_INSPECTOR_TREE = 'getInspectorTree' ,
2324 GET_INSPECTOR_STATE = 'getInspectorState' ,
@@ -101,6 +102,10 @@ export type HookPayloads = {
101102 componentInstance : ComponentInstance
102103 options : ComponentDevtoolsOptions
103104 }
105+ [ Hooks . GET_COMPONENT_RENDER_CODE ] : {
106+ componentInstance : ComponentInstance
107+ code : string
108+ }
104109 [ Hooks . INSPECT_TIMELINE_EVENT ] : {
105110 app : App
106111 layerId : string
@@ -158,6 +163,7 @@ export interface Hookable<TContext> {
158163 getComponentRootElements ( handler : HookHandler < HookPayloads [ Hooks . GET_COMPONENT_ROOT_ELEMENTS ] , TContext > )
159164 editComponentState ( handler : HookHandler < HookPayloads [ Hooks . EDIT_COMPONENT_STATE ] , TContext > )
160165 getComponentDevtoolsOptions ( handler : HookHandler < HookPayloads [ Hooks . GET_COMPONENT_DEVTOOLS_OPTIONS ] , TContext > )
166+ getComponentRenderCode ( handler : HookHandler < HookPayloads [ Hooks . GET_COMPONENT_RENDER_CODE ] , TContext > )
161167 inspectTimelineEvent ( handler : HookHandler < HookPayloads [ Hooks . INSPECT_TIMELINE_EVENT ] , TContext > )
162168 getInspectorTree ( handler : HookHandler < HookPayloads [ Hooks . GET_INSPECTOR_TREE ] , TContext > )
163169 getInspectorState ( handler : HookHandler < HookPayloads [ Hooks . GET_INSPECTOR_STATE ] , TContext > )
0 commit comments