mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Merge pull request #1085 from asger-semmle/extract-symbol
Approved by xiemaisi
This commit is contained in:
@@ -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 |
|
||||
@@ -0,0 +1,4 @@
|
||||
import javascript
|
||||
|
||||
from CanonicalName name
|
||||
select name
|
||||
@@ -0,0 +1,9 @@
|
||||
type Mapped<MK extends string = ''> = {
|
||||
[mk in MK]: string
|
||||
};
|
||||
|
||||
export function fn(ev: Mapped) {
|
||||
const props: Mapped = {
|
||||
...ev
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"include": ["."]
|
||||
}
|
||||
@@ -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 |
|
||||
@@ -0,0 +1,4 @@
|
||||
import javascript
|
||||
|
||||
from CanonicalName typename
|
||||
select typename, typename.getParent()
|
||||
@@ -0,0 +1,9 @@
|
||||
type Mapped<MK extends string = ';'> = {
|
||||
[mk in MK]: string
|
||||
};
|
||||
|
||||
export function fn(ev: Mapped) {
|
||||
const props: Mapped = {
|
||||
...ev
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"include": ["."]
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace Bar {
|
||||
|
||||
export interface Foo {
|
||||
[";x"]: number;
|
||||
w: number;
|
||||
}
|
||||
|
||||
let x : Foo;
|
||||
|
||||
}
|
||||
|
||||
let y: Bar.Foo;
|
||||
let z: typeof Bar[";"];
|
||||
Reference in New Issue
Block a user