Skip to content

Commit ef51b46

Browse files
committed
JS: mention newtype constructors in API graph label classes
1 parent 040dd09 commit ef51b46

File tree

1 file changed

+9
-17
lines changed

1 file changed

+9
-17
lines changed

javascript/ql/lib/semmle/javascript/ApiGraphs.qll

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,7 +1322,7 @@ module API {
13221322
MkLabelEntryPoint(API::EntryPoint e)
13231323

13241324
/** A label for an entry-point. */
1325-
class LabelEntryPoint extends ApiLabel {
1325+
class LabelEntryPoint extends ApiLabel, MkLabelEntryPoint {
13261326
API::EntryPoint e;
13271327

13281328
LabelEntryPoint() { this = MkLabelEntryPoint(e) }
@@ -1334,28 +1334,22 @@ module API {
13341334
}
13351335

13361336
/** A label that gets a promised value. */
1337-
class LabelPromised extends ApiLabel {
1338-
LabelPromised() { this = MkLabelPromised() }
1339-
1337+
class LabelPromised extends ApiLabel, MkLabelPromised {
13401338
override string toString() { result = "promised" }
13411339
}
13421340

13431341
/** A label that gets a rejected promise. */
1344-
class LabelPromisedError extends ApiLabel {
1345-
LabelPromisedError() { this = MkLabelPromisedError() }
1346-
1342+
class LabelPromisedError extends ApiLabel, MkLabelPromisedError {
13471343
override string toString() { result = "promisedError" }
13481344
}
13491345

13501346
/** A label that gets the return value of a function. */
1351-
class LabelReturn extends ApiLabel {
1352-
LabelReturn() { this = MkLabelReturn() }
1353-
1347+
class LabelReturn extends ApiLabel, MkLabelReturn {
13541348
override string toString() { result = "return" }
13551349
}
13561350

13571351
/** A label for a module. */
1358-
class LabelModule extends ApiLabel {
1352+
class LabelModule extends ApiLabel, MkLabelModule {
13591353
string mod;
13601354

13611355
LabelModule() { this = MkLabelModule(mod) }
@@ -1367,14 +1361,12 @@ module API {
13671361
}
13681362

13691363
/** A label that gets an instance from a `new` call. */
1370-
class LabelInstance extends ApiLabel {
1371-
LabelInstance() { this = MkLabelInstance() }
1372-
1364+
class LabelInstance extends ApiLabel, MkLabelInstance {
13731365
override string toString() { result = "instance" }
13741366
}
13751367

13761368
/** A label for the member named `prop`. */
1377-
class LabelMember extends ApiLabel {
1369+
class LabelMember extends ApiLabel, MkLabelMember {
13781370
string prop;
13791371

13801372
LabelMember() { this = MkLabelMember(prop) }
@@ -1386,14 +1378,14 @@ module API {
13861378
}
13871379

13881380
/** A label for a member with an unknown name. */
1389-
class LabelUnknownMember extends ApiLabel {
1381+
class LabelUnknownMember extends ApiLabel, MkLabelUnknownMember {
13901382
LabelUnknownMember() { this = MkLabelUnknownMember() }
13911383

13921384
override string toString() { result = "member *" }
13931385
}
13941386

13951387
/** A label for parameter `i`. */
1396-
class LabelParameter extends ApiLabel {
1388+
class LabelParameter extends ApiLabel, MkLabelParameter {
13971389
int i;
13981390

13991391
LabelParameter() { this = MkLabelParameter(i) }

0 commit comments

Comments
 (0)