CodeQL library for JavaScript/TypeScript
codeql/javascript-all 2.0.1-dev (changelog, source)
Search

Class Vue::Component

A Vue component, such as a new Vue({ ... }) call or a .vue file.

Generally speaking, a component is always created by calling Vue.extend() or calling extend on another component. Often the Vue.extend() call is performed by the Vue framework, however, so the call is not always visible in the user code. For instance, new Vue(obj) is shorthand for new (Vue.extend(obj)).

This class covers both the explicit Vue.extend() calls an those implicit in the framework.

The following types of components are recognized:

  • new Vue({...})
  • Vue.extend({...})
  • new ExtendedVue({...})
  • Vue.component("my-component", {...})
  • single file components in .vue files

Import path

import javascript

Direct supertypes

Known direct subtypes

Predicates

getABaseComponent

Gets a component which is extended by this one.

getABoundFunction

Gets a node for a function that will be invoked with this bound to this component.

getALifecycleHook

Gets the node for the life cycle hook of the hookName option of this component.

getAPropertyValue

Gets the data flow node that flows into the property name of this component, or is returned form a getter defining that property.

getAnInstanceRef

Gets a data flow node referring to an instance of this component.

getAsClassComponent

Gets the class implementing this Vue component, if any.

getComponentRef

Gets an API node referring to the component itself.

getComputed

Gets the node for the computed option of this component.

getData

Gets the node for the data option object of this component.

getInstance

Gets an API node referring to an instance of this component.

getMethods

Gets the node for the methods option of this component.

getOption

Gets the node for option name for this component, including those from extended objects and mixins.

getOptionSource

Gets a source node flowing into the option name of this component, including those from extended objects and mixins.

getOptions

Gets an API node referring to the options passed to the Vue object or one of its base component.

getOwnOption

Gets the node for option name for this component, not including those from extended objects and mixins.

getOwnOptions

Gets an API node referring to the options passed to the Vue object, such as the object literal {...} in new Vue{{...}) or the default export of a single-file component.

getRender

Gets the node for the render option of this component.

getTemplate

Gets the node for the template option of this component.

getTemplateElement

Gets the template element used by this component, if any.

getWatch

Gets the node for the watch option of this component.

getWatchHandler

Gets the function responding to changes to the given propName.

hasLocationInfo

Holds if this element is at the specified location. The location spans column startcolumn of line startline to column endcolumn of line endline in file filepath. For more information, see locations.

toString

Gets a textual representation of this element.