Merge remote-tracking branch 'upstream/rc/1.20' into merge/rc/1.20

This commit is contained in:
Robert Brignull
2019-03-13 10:55:30 +00:00
68 changed files with 16345 additions and 600 deletions

View File

@@ -154,6 +154,9 @@ where
or
// exclude result from js/overwritten-property
assign2.getBase() instanceof DataFlow::ObjectLiteralNode
or
// exclude result from accessor declarations
assign1.getWriteNode() instanceof AccessorMethodDeclaration
)
select assign1.getWriteNode(),
"This write to property '" + name + "' is useless, since $@ always overrides it.",

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[";"];

View File

@@ -150,6 +150,7 @@ test_IsTypeExpr
| tst.ts:81:38:81:50 | x is typeof x | tst.ts:81:38:81:38 | x | tst.ts:81:43:81:50 | typeof x |
test_ThisParameterTypes
| function hasThisParam | tst.ts:116:29:116:32 | void |
| method hasThisParam of interface InterfaceWithThisParam | tst.ts:119:22:119:43 | Interfa ... isParam |
test_ChildIndex
test_TypeArguments
| tst.ts:102:13:102:29 | f1<string>("foo") | 0 | 1 | tst.ts:102:16:102:21 | string |

View File

@@ -0,0 +1,7 @@
class C {
static get foo() {} // OK
static set foo(v) {} // OK
get bar() {} // OK
set bar(v) {} // OK
}

View File

@@ -0,0 +1,11 @@
import { Foo, Bar, Baz } from "somewhere"; // OK
export function f(this: Foo) {}
export class C {
m(this: Bar) {}
}
export default {
foo(this: Baz) {}
}