Merge pull request #929 from asger-semmle/typescript-no-expansion

Approved by xiemaisi
This commit is contained in:
semmle-qlci 2019-02-13 18:20:41 +00:00 коммит произвёл GitHub
Родитель 92a6e7e04c 0444fa307d
Коммит 26525fc1b5
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
13 изменённых файлов: 2 добавлений и 85 удалений

Просмотреть файл

@ -409,7 +409,7 @@ function handlePrepareFilesCommand(command: PrepareFilesCommand) {
function reset() {
state = new State();
state.typeTable.restrictedExpansion = getEnvironmentVariable("SEMMLE_TYPESCRIPT_NO_EXPANSION", Boolean, false);
state.typeTable.restrictedExpansion = getEnvironmentVariable("SEMMLE_TYPESCRIPT_NO_EXPANSION", Boolean, true);
}
function getEnvironmentVariable<T>(name: string, parse: (x: string) => T, defaultValue: T) {

Просмотреть файл

@ -1,36 +1,16 @@
| (ConcatArray<T> \| ConcatArray<ConcatArray<T>>)[] | `ConcatArray<T> \| ConcatArray<ConcatArray<T>>` |
| (ConcatArray<number> \| ConcatArray<ConcatArray<... | `ConcatArray<number> \| ConcatArray<ConcatArray<n...` |
| (ConcatArray<string \| number> \| ConcatArray<Con... | `ConcatArray<string \| number> \| ConcatArray<Conc...` |
| (S \| ConcatArray<S>)[] | `S \| ConcatArray<S>` |
| (T \| ConcatArray<T> \| ConcatArray<T \| ConcatArr... | `T \| ConcatArray<T> \| ConcatArray<T \| ConcatArra...` |
| (T \| ConcatArray<T>)[] | `T \| ConcatArray<T>` |
| (T \| ConcatArray<T>)[] | `T \| ConcatArray<T>` |
| (U \| ConcatArray<U>)[] | `U \| ConcatArray<U>` |
| (number \| ConcatArray<number> \| ConcatArray<num... | `number \| ConcatArray<number> \| ConcatArray<numb...` |
| (number \| ConcatArray<number>)[] | `number \| ConcatArray<number>` |
| (string \| ConcatArray<string>)[] | `string \| ConcatArray<string>` |
| (string \| number \| ConcatArray<string \| number>)[] | `string \| number \| ConcatArray<string \| number>` |
| (string \| number \| ConcatArray<string \| number>... | `string \| number \| ConcatArray<string \| number> ...` |
| (string \| number)[] | `string \| number` |
| ConcatArray<ConcatArray<T>>[] | `ConcatArray<ConcatArray<T>>` |
| ConcatArray<ConcatArray<number>>[] | `ConcatArray<ConcatArray<number>>` |
| ConcatArray<ConcatArray<string \| number>>[] | `ConcatArray<ConcatArray<string \| number>>` |
| ConcatArray<S>[] | `ConcatArray<S>` |
| ConcatArray<T \| ConcatArray<T>>[] | `ConcatArray<T \| ConcatArray<T>>` |
| ConcatArray<T>[] | `ConcatArray<T>` |
| ConcatArray<T>[] | `ConcatArray<T>` |
| ConcatArray<U>[] | `ConcatArray<U>` |
| ConcatArray<number \| ConcatArray<number>>[] | `ConcatArray<number \| ConcatArray<number>>` |
| ConcatArray<number>[] | `ConcatArray<number>` |
| ConcatArray<string \| number \| ConcatArray<strin... | `ConcatArray<string \| number \| ConcatArray<strin...` |
| ConcatArray<string \| number>[] | `ConcatArray<string \| number>` |
| ConcatArray<string>[] | `ConcatArray<string>` |
| ReadonlyArray<T> | `T` |
| ReadonlyArray<number> | `number` |
| S[] | `S` |
| T[] | `T` |
| T[] | `T` |
| T[] | `T` |
| U[] | `U` |
| [number, string] | `string \| number` |
| any[] | `any` |

Просмотреть файл

@ -1,36 +1,10 @@
| (ConcatArray<T> \| ConcatArray<ConcatArray<T>>)[] | ConcatArray<T> \| ConcatArray<ConcatArray<T>> |
| (ConcatArray<number> \| ConcatArray<ConcatArray<... | ConcatArray<number> \| ConcatArray<ConcatArray<n... |
| (ConcatArray<string \| number> \| ConcatArray<Con... | ConcatArray<string \| number> \| ConcatArray<Conc... |
| (S \| ConcatArray<S>)[] | S \| ConcatArray<S> |
| (T \| ConcatArray<T> \| ConcatArray<T \| ConcatArr... | T \| ConcatArray<T> \| ConcatArray<T \| ConcatArra... |
| (T \| ConcatArray<T>)[] | T \| ConcatArray<T> |
| (T \| ConcatArray<T>)[] | T \| ConcatArray<T> |
| (U \| ConcatArray<U>)[] | U \| ConcatArray<U> |
| (number \| ConcatArray<number> \| ConcatArray<num... | number \| ConcatArray<number> \| ConcatArray<numb... |
| (number \| ConcatArray<number>)[] | number \| ConcatArray<number> |
| (string \| ConcatArray<string>)[] | string \| ConcatArray<string> |
| (string \| number \| ConcatArray<string \| number>)[] | string \| number \| ConcatArray<string \| number> |
| (string \| number \| ConcatArray<string \| number>... | string \| number \| ConcatArray<string \| number> ... |
| (string \| number)[] | string \| number |
| (string \| number)[] \| ConcatArray<string \| numb... | string \| number \| ConcatArray<string \| number> |
| ConcatArray<ConcatArray<T>>[] | ConcatArray<ConcatArray<T>> |
| ConcatArray<ConcatArray<number>>[] | ConcatArray<ConcatArray<number>> |
| ConcatArray<ConcatArray<string \| number>>[] | ConcatArray<ConcatArray<string \| number>> |
| ConcatArray<S>[] | ConcatArray<S> |
| ConcatArray<T \| ConcatArray<T>>[] | ConcatArray<T \| ConcatArray<T>> |
| ConcatArray<T> | T |
| ConcatArray<T> | T |
| ConcatArray<T> \| ConcatArray<ConcatArray<T>> | T \| ConcatArray<T> |
| ConcatArray<T>[] | ConcatArray<T> |
| ConcatArray<T>[] | ConcatArray<T> |
| ConcatArray<U>[] | ConcatArray<U> |
| ConcatArray<number \| ConcatArray<number>>[] | ConcatArray<number \| ConcatArray<number>> |
| ConcatArray<number> | number |
| ConcatArray<number> \| ConcatArray<ConcatArray<n... | number \| ConcatArray<number> |
| ConcatArray<number>[] | ConcatArray<number> |
| ConcatArray<string \| number \| ConcatArray<strin... | ConcatArray<string \| number \| ConcatArray<strin... |
| ConcatArray<string \| number> | string \| number |
| ConcatArray<string \| number> \| ConcatArray<Conc... | string \| number \| ConcatArray<string \| number> |
| ConcatArray<string \| number>[] | ConcatArray<string \| number> |
| ConcatArray<string>[] | ConcatArray<string> |
| NumberIndexable | object |
@ -38,14 +12,10 @@
| ReadonlyArray<number> | number |
| S[] | S |
| T[] | T |
| T[] | T |
| T[] | T |
| T[] \| ConcatArray<T>[] | T \| ConcatArray<T> |
| U[] | U |
| [number, string] | string \| number |
| any[] | any |
| number[] | number |
| number[] \| ConcatArray<number>[] | number \| ConcatArray<number> |
| string | string |
| string \| ConcatArray<string> | string |
| string \| string[] | string |

Просмотреть файл

@ -13,5 +13,4 @@
| IMulti | IGenericBase |
| IStringSub | IGenericBase |
| ISub | IBase |
| RegExpExecArray | Array |
| RegExpMatchArray | Array |

Просмотреть файл

@ -1,4 +1,3 @@
| Array | T[] |
| CBase | CBase |
| CEverything | CEverything<S, T> |
| CGenericBase | CGenericBase<T> |
@ -9,7 +8,6 @@
| CStringSub | CStringSub |
| CSub | CSub |
| CollatorOptions | CollatorOptions |
| ConcatArray | ConcatArray<T> |
| Function | Function |
| IBase | IBase |
| IEmpty | IEmpty |
@ -22,5 +20,4 @@
| NumberFormatOptions | NumberFormatOptions |
| Object | Object |
| RegExp | RegExp |
| RegExpExecArray | RegExpExecArray |
| RegExpMatchArray | RegExpMatchArray |

Просмотреть файл

@ -1,3 +1,4 @@
| Box in shared_non_expansive.ts | has no properties |
| Box in through_non_expansive.ts | has no properties |
| C in expansive_class.ts | has no properties |
| Expand in through_non_expansive.ts | has no properties |

Просмотреть файл

@ -6,7 +6,6 @@
| Box in shared_non_expansive.ts | has properties |
| Box in through_non_expansive.ts | has properties |
| C in expansive_class.ts | has properties |
| ConcatArray in global scope | has properties |
| Expand in through_non_expansive.ts | has properties |
| ExpandUsingObjectLiteral in expansive_object_literal.ts | has properties |
| Expansive in leading_into_expansion.ts | has properties |
@ -32,6 +31,3 @@
| Intl.NumberFormatOptions in global scope | has properties |
| NonExpansive in shared_non_expansive.ts | has properties |
| Object in global scope | has properties |
| RegExp in global scope | has properties |
| RegExpExecArray in global scope | has properties |
| RegExpMatchArray in global scope | has properties |

Просмотреть файл

@ -6,6 +6,5 @@
| ModernGlobals.ModernSubclass | ModernSubclass |
| Object | Object |
| RegExp | RegExp |
| RegExpExecArray | RegExpExecArray |
| RegExpMatchArray | RegExpMatchArray |
| __Legacy.LegacyClass | LegacyClass |

Просмотреть файл

@ -12,7 +12,6 @@
| Object | has no definition |
| OtherClass | has no definition |
| RegExp | has no definition |
| RegExpExecArray | has no definition |
| RegExpMatchArray | has no definition |
| UtilClass | has no definition |
| UtilExtraClass | has no definition |

Просмотреть файл

@ -1,4 +1,2 @@
| T | Array.T in global scope |
| T | ConcatArray.T in global scope |
| T | GenericMethods.T in global scope |
| T | Repeated.T in global scope |

Просмотреть файл

@ -1,36 +1,18 @@
| <D>(x: D): D | 1 | 0 | D | no bound |
| <E>(x: () => E): E | 1 | 0 | E | no bound |
| <E>(x: E[]): E | 1 | 0 | E | no bound |
| <S extends ConcatArray<T \| S>>(callbackfn: (value: ConcatArray<T \| S>... | 1 | 0 | S | ConcatArray<T \| S> |
| <S extends E>(callbackfn: (value: E, index: number, array: E[]) => va... | 1 | 0 | S | no bound |
| <S extends S>(callbackfn: (value: S, index: number, array: S[]) => va... | 1 | 0 | S | no bound |
| <S extends T \| S \| ConcatArray<T \| S>>(callbackfn: (value: T \| S \| Co... | 1 | 0 | S | no bound |
| <S extends T \| S>(callbackfn: (value: T \| S, index: number, array: (T... | 1 | 0 | S | no bound |
| <S extends T>(callbackfn: (value: T, index: number, array: T[]) => va... | 1 | 0 | S | no bound |
| <S extends T>(callbackfn: (value: T, index: number, array: T[]) => va... | 1 | 0 | S | no bound |
| <S extends U>(callbackfn: (value: U, index: number, array: U[]) => va... | 1 | 0 | S | no bound |
| <S extends any>(callbackfn: (value: any, index: number, array: any[])... | 1 | 0 | S | any |
| <S extends any[]>(x: S, y: T[]): S | 1 | 0 | S | any[] |
| <S extends string>(callbackfn: (value: string, index: number, array: ... | 1 | 0 | S | string |
| <S>(x: S, y: S): S | 1 | 0 | S | no bound |
| <S>(x: S, y: T): [S, T] | 1 | 0 | S | no bound |
| <U>(callbackfn: (previousValue: U, currentValue: ConcatArray<T \| S>, ... | 1 | 0 | U | no bound |
| <U>(callbackfn: (previousValue: U, currentValue: E, currentIndex: num... | 1 | 0 | U | no bound |
| <U>(callbackfn: (previousValue: U, currentValue: S, currentIndex: num... | 1 | 0 | U | no bound |
| <U>(callbackfn: (previousValue: U, currentValue: T \| S \| ConcatArray<... | 1 | 0 | U | no bound |
| <U>(callbackfn: (previousValue: U, currentValue: T \| S, currentIndex:... | 1 | 0 | U | no bound |
| <U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: num... | 1 | 0 | U | no bound |
| <U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: num... | 1 | 0 | U | no bound |
| <U>(callbackfn: (previousValue: U, currentValue: U, currentIndex: num... | 1 | 0 | U | no bound |
| <U>(callbackfn: (previousValue: U, currentValue: any, currentIndex: n... | 1 | 0 | U | no bound |
| <U>(callbackfn: (previousValue: U, currentValue: string, currentIndex... | 1 | 0 | U | no bound |
| <U>(callbackfn: (value: ConcatArray<T \| S>, index: number, array: Con... | 1 | 0 | U | no bound |
| <U>(callbackfn: (value: E, index: number, array: E[]) => U, thisArg?:... | 1 | 0 | U | no bound |
| <U>(callbackfn: (value: S, index: number, array: S[]) => U, thisArg?:... | 1 | 0 | U | no bound |
| <U>(callbackfn: (value: T \| S \| ConcatArray<T \| S>, index: number, ar... | 1 | 0 | U | no bound |
| <U>(callbackfn: (value: T \| S, index: number, array: (T \| S)[]) => U,... | 1 | 0 | U | no bound |
| <U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?:... | 1 | 0 | U | no bound |
| <U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?:... | 1 | 0 | U | no bound |
| <U>(callbackfn: (value: U, index: number, array: U[]) => U, thisArg?:... | 1 | 0 | U | no bound |
| <U>(callbackfn: (value: any, index: number, array: any[]) => U, thisA... | 1 | 0 | U | no bound |
| <U>(callbackfn: (value: string, index: number, array: string[]) => U,... | 1 | 0 | U | no bound |

Просмотреть файл

@ -1,4 +1,2 @@
| T | Array.T in global scope |
| T | ConcatArray.T in global scope |
| T | GenericMethods.T in global scope |
| T | Repeated.T in global scope |

Просмотреть файл

@ -1,4 +1,2 @@
| T | Array.T in global scope | Array in global scope |
| T | ConcatArray.T in global scope | ConcatArray in global scope |
| T | GenericMethods.T in global scope | GenericMethods in global scope |
| T | Repeated.T in global scope | Repeated in global scope |