Skip to content

Commit 0ee1e8b

Browse files
committed
JS: Rename ExtendedVue to ComponentExtension
1 parent 8819513 commit 0ee1e8b

File tree

1 file changed

+10
-4
lines changed
  • javascript/ql/lib/semmle/javascript/frameworks

1 file changed

+10
-4
lines changed

javascript/ql/lib/semmle/javascript/frameworks/Vue.qll

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,12 @@ module Vue {
5757
VueExtendCall() { this = component().getMember("extend").getACall() }
5858
}
5959

60+
/** A component created by an explicit or implicit call to `Vue.extend`. */
6061
private newtype TComponent =
62+
MkComponentExtension(VueExtendCall extend) or
6163
MkComponentInstantiation(API::NewNode sub) {
6264
sub = component().getAnInstantiation()
6365
} or
64-
MkExtendedVue(VueExtendCall extend) or
6566
MkComponentRegistration(API::CallNode def) { def = vueLibrary().getMember("component").getACall() } or
6667
MkSingleFileComponent(VueFile file)
6768

@@ -431,12 +432,17 @@ module Vue {
431432
}
432433

433434
/**
434-
* An extended Vue from `Vue.extend({...})`.
435+
* DEPRECATED. Use `Vue::ComponentExtension` or `Vue::Component` instead.
435436
*/
436-
class ExtendedVue extends Component, MkExtendedVue {
437+
deprecated class ExtendedVue = ComponentExtension;
438+
439+
/**
440+
* A component created via an explicit call to `Vue.extend({...})` or `CustomComponent.extend({...})`.
441+
*/
442+
class ComponentExtension extends Component, MkComponentExtension {
437443
VueExtendCall extend;
438444

439-
ExtendedVue() { this = MkExtendedVue(extend) }
445+
ComponentExtension() { this = MkComponentExtension(extend) }
440446

441447
override string toString() { result = extend.toString() }
442448

0 commit comments

Comments
 (0)