Merge pull request #1085 from asger-semmle/extract-symbol

Approved by xiemaisi
This commit is contained in:
semmle-qlci
2019-03-12 14:07:17 +00:00
committed by GitHub
11 changed files with 107 additions and 12 deletions

View File

@@ -0,0 +1,11 @@
| in unknown scope |
| Array in global scope |
| Intl in global scope |
| Intl.CollatorOptions in global scope |
| Intl.NumberFormatOptions in global scope |
| MK in unknown scope |
| Mapped in test.ts |
| RegExp in global scope |
| RegExpMatchArray in global scope |
| fn in test.ts |
| test.ts |

View File

@@ -0,0 +1,4 @@
import javascript
from CanonicalName name
select name

View File

@@ -0,0 +1,9 @@
type Mapped<MK extends string = ''> = {
    [mk in MK]: string
};
export function fn(ev: Mapped) {
    const props: Mapped = {
        ...ev
    };
}

View File

@@ -0,0 +1,3 @@
{
"include": ["."]
}

View File

@@ -0,0 +1,4 @@
| Bar.Foo in global scope | Bar in global scope |
| Intl.CollatorOptions in global scope | Intl in global scope |
| Intl.NumberFormatOptions in global scope | Intl in global scope |
| fn in test.ts | test.ts |

View File

@@ -0,0 +1,4 @@
import javascript
from CanonicalName typename
select typename, typename.getParent()

View File

@@ -0,0 +1,9 @@
type Mapped<MK extends string = ';'> = {
    [mk in MK]: string
};
export function fn(ev: Mapped) {
    const props: Mapped = {
        ...ev
    };
}

View File

@@ -0,0 +1,3 @@
{
"include": ["."]
}

View File

@@ -0,0 +1,13 @@
namespace Bar {
export interface Foo {
[";x"]: number;
w: number;
}
let x : Foo;
}
let y: Bar.Foo;
let z: typeof Bar[";"];