chore: rename method to make it more explicit it is dev only
This commit is contained in:
		
							parent
							
								
									3a75d5d694
								
							
						
					
					
						commit
						8681c12c0c
					
				@ -12,7 +12,7 @@ import {
 | 
			
		||||
import {
 | 
			
		||||
  ComponentPublicInstance,
 | 
			
		||||
  PublicInstanceProxyHandlers,
 | 
			
		||||
  createRenderContext,
 | 
			
		||||
  createDevRenderContext,
 | 
			
		||||
  exposePropsOnRenderContext,
 | 
			
		||||
  exposeSetupStateOnRenderContext,
 | 
			
		||||
  ComponentPublicInstanceConstructor,
 | 
			
		||||
@ -521,7 +521,7 @@ export function createComponentInstance(
 | 
			
		||||
    sp: null
 | 
			
		||||
  }
 | 
			
		||||
  if (__DEV__) {
 | 
			
		||||
    instance.ctx = createRenderContext(instance)
 | 
			
		||||
    instance.ctx = createDevRenderContext(instance)
 | 
			
		||||
  } else {
 | 
			
		||||
    instance.ctx = { _: instance }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@ -484,10 +484,11 @@ export const RuntimeCompiledPublicInstanceProxyHandlers = /*#__PURE__*/ extend(
 | 
			
		||||
  }
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// dev only
 | 
			
		||||
// In dev mode, the proxy target exposes the same properties as seen on `this`
 | 
			
		||||
// for easier console inspection. In prod mode it will be an empty object so
 | 
			
		||||
// these properties definitions can be skipped.
 | 
			
		||||
export function createRenderContext(instance: ComponentInternalInstance) {
 | 
			
		||||
export function createDevRenderContext(instance: ComponentInternalInstance) {
 | 
			
		||||
  const target: Record<string, any> = {}
 | 
			
		||||
 | 
			
		||||
  // expose internal instance for proxy handlers
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user