Specify @strict: false on lots of tests that would fail under noImplicitAny.

This commit is contained in:
Daniel Rosenwasser 2026-02-03 23:10:34 +00:00
parent 5210752a19
commit 1e676f053c
103 changed files with 204 additions and 101 deletions

View File

@ -1,3 +1,4 @@
// @target: es2015
// @strict: false
// @target: es2015
declare namespace Foo.Bar { export var foo; };
Foo.Bar.foo = 5;

View File

@ -1,4 +1,5 @@
// @target: es2015
// @strict: false
// @target: es2015
class C {
static x
static y

View File

@ -1,4 +1,5 @@
// @target: es2015
// @strict: false
// @target: es2015
class Base {
constructor(...arg) {
}

View File

@ -1,4 +1,5 @@
// @target: es2015
// @strict: false
// @target: es2015
declare function commentedParameters(...args): any;
function ifelse() {

View File

@ -1,4 +1,5 @@
// @target: es2015
// @strict: false
// @target: es2015
function commentedParameters(
/* Parameter a */
a

View File

@ -1,4 +1,5 @@
// @target: es2015
// @strict: false
// @target: es2015
function commentedParameters(
/* Parameter a */
a /* End of parameter a */

View File

@ -1,4 +1,5 @@
// @target: es2015
// @strict: false
// @target: es2015
function commentedParameters(
a /* parameter a */,
b /* parameter b */,

View File

@ -1,4 +1,5 @@
// @target: es2015
// @strict: false
// @target: es2015
function getSecurity(level) {
switch(level){
case 0: // Zero

View File

@ -1,4 +1,5 @@
// @target: es2015
// @strict: false
// @target: es2015
function getSecurity(level) {
switch(level){
case 0: // Zero

View File

@ -1,4 +1,5 @@
// @target: es2015
// @strict: false
// @target: es2015
function getSecurity(level) {
switch(level){
case 0: /*Zero*/

View File

@ -1,3 +1,4 @@
// @strict: false
// @target: es2015
// @strictNullChecks: true

View File

@ -1,4 +1,5 @@
// @target: es2015
// @strict: false
// @target: es2015
// @declaration: true
function baz([, z, , ]) { }
function foo([, b, ]: [any, any]): void { }

View File

@ -1,4 +1,5 @@
// @target: es2015
// @strict: false
// @target: es2015
// @declaration: true
function foo([x, y, z] ?: [string, number, boolean]);

View File

@ -1,4 +1,5 @@
// @target: es2015
// @strict: false
// @target: es2015
// @removeComments: true
class C {

View File

@ -1,4 +1,5 @@
// @target: es2015
// @strict: false
// @target: es2015
// @removeComments: true
class C {

View File

@ -1,4 +1,5 @@
// @target: es5, es2015
// @strict: false
// @target: es5, es2015
(x) => ({ "1": "one", "2": "two" } as { [key: string]: string })[x];
(x) => ({ "1": "one", "2": "two" } as { [key: string]: string }).x;

View File

@ -1,4 +1,5 @@
// @target: es6
// @strict: false
// @target: es6
(x) => ({ "1": "one", "2": "two" } as { [key: string]: string })[x];
(x) => ({ "1": "one", "2": "two" } as { [key: string]: string }).x;

View File

@ -1,4 +1,5 @@
// @target: es2015
// @strict: false
// @target: es2015
namespace TypeScript.Parser {
class SyntaxCursor {
public currentNode(): SyntaxNode {

View File

@ -1,3 +1,4 @@
// @strict: false
// @target: es2015
//@noUncheckedIndexedAccess: true
//@strictNullChecks: true

View File

@ -1,4 +1,5 @@
// @target: es2015
// @strict: false
// @target: es2015
class T {
m(...p3) {

View File

@ -1,4 +1,5 @@
// @target: ES6
// @strict: false
// @target: ES6
function CreateTypedArrayTypes() {
var typedArrays = [];

View File

@ -1,4 +1,5 @@
// @target:es5, es2015
// @strict: false
// @target:es5, es2015
var f1 = () => { }
var f2 = (x: string, y: string) => { }
var f3 = (x: string, y: number, ...rest) => { }

View File

@ -1,4 +1,5 @@
// @target:ES5, ES2015
// @strict: false
// @target:ES5, ES2015
var arrow1 = a => { };
var arrow2 = (a) => { };

View File

@ -1,4 +1,5 @@
// @target:ES6
// @strict: false
// @target:ES6
var arrow1 = a => { };
var arrow2 = (a) => { };

View File

@ -1,4 +1,5 @@
// @target:es6
// @strict: false
// @target:es6
var f1 = () => { }
var f2 = (x: string, y: string) => { }
var f3 = (x: string, y: number, ...rest) => { }

View File

@ -1,4 +1,5 @@
// @target:es5, es2015
// @strict: false
// @target:es5, es2015
var f1 = () => {
this.age = 10
};

View File

@ -1,4 +1,5 @@
// @target:es6
// @strict: false
// @target:es6
var f1 = () => {
this.age = 10
};

View File

@ -1,4 +1,5 @@
// @target: es5, es2015
// @strict: false
// @target: es5, es2015
var a = () => {
var arg = arguments[0]; // error
}

View File

@ -1,4 +1,5 @@
// @target: es6
// @strict: false
// @target: es6
var a = () => {
var arg = arguments[0]; // error
}

View File

@ -1,3 +1,4 @@
// @target: es5, es2015
// @strict: false
// @target: es5, es2015
var a = () => arguments;

View File

@ -1,3 +1,4 @@
// @target: es6
// @strict: false
// @target: es6
var a = () => arguments;

View File

@ -1,4 +1,5 @@
// @target: es5, es2015
// @strict: false
// @target: es5, es2015
var arguments;
var a = () => arguments;

View File

@ -1,4 +1,5 @@
// @target: es6
// @strict: false
// @target: es6
var arguments;
var a = () => arguments;

View File

@ -1,4 +1,5 @@
// @target: es5, es2015
// @strict: false
// @target: es5, es2015
function f() {
var arguments;

View File

@ -1,4 +1,5 @@
// @target: es6
// @strict: false
// @target: es6
function f() {
var arguments;

View File

@ -1,4 +1,5 @@
// @target: es5, es2015
// @strict: false
// @target: es5, es2015
function f(arguments) {
var a = () => arguments;

View File

@ -1,4 +1,5 @@
// @target: es6
// @strict: false
// @target: es6
function f(arguments) {
var a = () => arguments;

View File

@ -1,4 +1,5 @@
// @target: es5, es2015
// @strict: false
// @target: es5, es2015
function f(arguments) {
var a = () => () => arguments;

View File

@ -1,4 +1,5 @@
// @target: es6
// @strict: false
// @target: es6
function f(arguments) {
var a = () => () => arguments;

View File

@ -1,4 +1,5 @@
// @target: es5, es2015
// @strict: false
// @target: es5, es2015
function f(arguments) {
var a = (arguments) => () => arguments;

View File

@ -1,4 +1,5 @@
// @target: es6
// @strict: false
// @target: es6
function f(arguments) {
var a = (arguments) => () => arguments;

View File

@ -1,4 +1,5 @@
// @target: es5, es2015
// @strict: false
// @target: es5, es2015
function f(arguments) {
var a = () => (arguments) => arguments;

View File

@ -1,4 +1,5 @@
// @target: es6
// @strict: false
// @target: es6
function f(arguments) {
var a = () => (arguments) => arguments;

View File

@ -1,4 +1,5 @@
// @target: es5, es2015
// @strict: false
// @target: es5, es2015
function f(_arguments) {
var a = () => () => arguments;

View File

@ -1,4 +1,5 @@
// @target: es6
// @strict: false
// @target: es6
function f(_arguments) {
var a = () => () => arguments;

View File

@ -1,4 +1,5 @@
// @target: es5, es2015
// @strict: false
// @target: es5, es2015
function f() {
var _arguments = 10;

View File

@ -1,4 +1,5 @@
// @target: es6
// @strict: false
// @target: es6
function f() {
var _arguments = 10;

View File

@ -1,4 +1,5 @@
// @target: es5, es2015
// @strict: false
// @target: es5, es2015
function f(arguments) {
var _arguments = 10;

View File

@ -1,4 +1,5 @@
// @target: es6
// @strict: false
// @target: es6
function f(arguments) {
var _arguments = 10;

View File

@ -1,4 +1,5 @@
// @target: es5, es2015
// @strict: false
// @target: es5, es2015
class C {
f(arguments) {

View File

@ -1,4 +1,5 @@
// @target: es6
// @strict: false
// @target: es6
class C {
f(arguments) {

View File

@ -1,4 +1,5 @@
// @target: es5, es2015
// @strict: false
// @target: es5, es2015
function f() {
var _arguments = 10;

View File

@ -1,4 +1,5 @@
// @target: es6
// @strict: false
// @target: es6
function f() {
var _arguments = 10;

View File

@ -1,4 +1,5 @@
// @target: es5, es2015
// @strict: false
// @target: es5, es2015
function f() {
if (Math.random()) {

View File

@ -1,4 +1,5 @@
// @target: es6
// @strict: false
// @target: es6
function f() {
if (Math.random()) {

View File

@ -1,4 +1,5 @@
// @target: es5, es2015
// @strict: false
// @target: es5, es2015
function f() {
var arguments = "hello";

View File

@ -1,4 +1,5 @@
// @target: es6
// @strict: false
// @target: es6
function f() {
var arguments = "hello";

View File

@ -1,4 +1,5 @@
// @target: es5, es2015
// @strict: false
// @target: es5, es2015
function f() {
var arguments = "hello";

View File

@ -1,4 +1,5 @@
// @target: es6
// @strict: false
// @target: es6
function f() {
var arguments = "hello";

View File

@ -1,4 +1,5 @@
// @target: es5, es2015
// @strict: false
// @target: es5, es2015
function f() {
var { arguments } = { arguments: "hello" };

View File

@ -1,4 +1,5 @@
// @target: es6
// @strict: false
// @target: es6
function f() {
var { arguments } = { arguments: "hello" };

View File

@ -1,4 +1,5 @@
// @target: es5, es2015
// @strict: false
// @target: es5, es2015
function f() {
var { arguments: args } = { arguments };

View File

@ -1,4 +1,5 @@
// @target: es6
// @strict: false
// @target: es6
function f() {
var { arguments: args } = { arguments };

View File

@ -1,4 +1,5 @@
// @target: es5, es2015
// @strict: false
// @target: es5, es2015
function f() {
function g() {

View File

@ -1,4 +1,5 @@
// @target: es6
// @strict: false
// @target: es6
function f() {
function g() {

View File

@ -1,4 +1,5 @@
// @target:ES5, ES2015
// @strict: false
// @target:ES5, ES2015
var arrow1 = a => { };
var arrow2 = (a) => { };

View File

@ -1,4 +1,5 @@
// @target:ES6
// @strict: false
// @target:ES6
var arrow1 = a => { };
var arrow2 = (a) => { };

View File

@ -1,4 +1,5 @@
// @target: es6
// @strict: false
// @target: es6
class A {
y: number;
constructor(x: number) {

View File

@ -1,4 +1,5 @@
// @target: es6
// @strict: false
// @target: es6
class B<T> {
x: T;
B: T;

View File

@ -1,4 +1,5 @@
// @target: es2015
// @strict: false
// @target: es2015
declare var Factory: any
class Base {

View File

@ -1,4 +1,5 @@
// @target: es2015
// @strict: false
// @target: es2015
class Base {
constructor(c) { }
}

View File

@ -1,4 +1,5 @@
// @target: es2015
// @strict: false
// @target: es2015
class D extends null {
private _t;
constructor() {

View File

@ -1,4 +1,5 @@
// @target: es2015
// @strict: false
// @target: es2015
class Base {
constructor(c) { }
}

View File

@ -1,4 +1,5 @@
// @target: es5, es2015
// @strict: false
// @target: es5, es2015
function foo(x: string, y = 10) { }
function baz(x: string, y = 5, ...rest) { }
function bar(y = 10) { }

View File

@ -1,4 +1,5 @@
// @target:es6
// @strict: false
// @target:es6
function foo(x: string, y = 10) { }
function baz(x: string, y = 5, ...rest) { }
function bar(y = 10) { }

View File

@ -1,4 +1,5 @@
// @target: es5, es2015
// @strict: false
// @target: es5, es2015
var lambda1 = (y = "hello") => { }
var lambda2 = (x: number, y = "hello") => { }
var lambda3 = (x: number, y = "hello", ...rest) => { }

View File

@ -1,4 +1,5 @@
// @target:es6
// @strict: false
// @target:es6
var lambda1 = (y = "hello") => { }
var lambda2 = (x: number, y = "hello") => { }
var lambda3 = (x: number, y = "hello", ...rest) => { }

View File

@ -1,4 +1,5 @@
// @target: es5, es2015
// @strict: false
// @target: es5, es2015
var obj2 = {
func1(y = 10, ...rest) { },
func2(x = "hello") { },

View File

@ -1,4 +1,5 @@
// @target:es6
// @strict: false
// @target:es6
var obj2 = {
func1(y = 10, ...rest) { },
func2(x = "hello") { },

View File

@ -1,4 +1,5 @@
// @target: es5, es2015
// @strict: false
// @target: es5, es2015
class C {
constructor(t: boolean, z: string, x: number, y = "hello") { }

View File

@ -1,4 +1,5 @@
// @target:es6
// @strict: false
// @target:es6
class C {
constructor(t: boolean, z: string, x: number, y = "hello") { }

View File

@ -1,4 +1,5 @@
// @target: es2015
// @strict: false
// @target: es2015
// In a destructuring assignment expression, the type of the expression on the right must be assignable to the assignment target on the left.
// An expression of type S is considered assignable to an assignment target V if one of the following is true

View File

@ -1,4 +1,5 @@
// @target: es6
// @strict: false
// @target: es6
// In a destructuring assignment expression, the type of the expression on the right must be assignable to the assignment target on the left.
// An expression of type S is considered assignable to an assignment target V if one of the following is true

View File

@ -1,2 +1,3 @@
//@target: ES6
// @strict: false
//@target: ES6
for (var let of []) {}

View File

@ -1,3 +1,4 @@
// @target: es5, es2015
// @strict: false
// @target: es5, es2015
function bar(...rest) { }
function foo(x: number, y: string, ...rest) { }

View File

@ -1,3 +1,4 @@
// @target: es6
// @strict: false
// @target: es6
function bar(...rest) { }
function foo(x: number, y: string, ...rest) { }

View File

@ -1,4 +1,5 @@
// @target: es5, es2015
// @strict: false
// @target: es5, es2015
var funcExp = (...rest) => { }
var funcExp1 = (X: number, ...rest) => { }
var funcExp2 = function (...rest) { }

View File

@ -1,4 +1,5 @@
// @target: es6
// @strict: false
// @target: es6
var funcExp = (...rest) => { }
var funcExp1 = (X: number, ...rest) => { }
var funcExp2 = function (...rest) { }

View File

@ -1,4 +1,5 @@
// @target: es5, es2015
// @strict: false
// @target: es5, es2015
var obj: {
func1: (...rest) => void
}

View File

@ -1,4 +1,5 @@
// @target: es6
// @strict: false
// @target: es6
var obj: {
func1: (...rest) => void
}

View File

@ -1,4 +1,5 @@
// @target: es5, es2015
// @strict: false
// @target: es5, es2015
class C {
constructor(name: string, ...rest) { }

View File

@ -1,4 +1,5 @@
// @target: es6
// @strict: false
// @target: es6
class C {
constructor(name: string, ...rest) { }

View File

@ -1,2 +1,3 @@
// @target: ES6
// @strict: false
// @target: ES6
var x = x => `abc${ x }def`;

View File

@ -1,4 +1,5 @@
// @target: es6
// @strict: false
// @target: es6
function* gen() {
// Once this is supported, the inner expression does not need to be parenthesized.
var x = yield `abc${ x }def`;

View File

@ -1,2 +1,3 @@
// @target: ES6
// @strict: false
// @target: ES6
var x = `abc${ x => x }def`;

View File

@ -1,4 +1,5 @@
// @target: ES6
// @strict: false
// @target: ES6
function* gen() {
// Once this is supported, yield *must* be parenthesized.
var x = `abc${ yield 10 }def`;

View File

@ -1,4 +1,5 @@
// @target: es2015
// @strict: false
// @target: es2015
// ElementList: ( Modified )
// Elisionopt AssignmentExpression
// Elisionopt SpreadElement

View File

@ -1,4 +1,5 @@
// @target: es2015
// @strict: false
// @target: es2015
// When a function expression with no type parameters and no parameter type annotations
// is contextually typed (section 4.19) by a type T and a contextual signature S can be extracted from T

View File

@ -1,4 +1,5 @@
// @target: es2015
// @strict: false
// @target: es2015
function f1() {
var a, b, c;
if (a < b || b > (c + 1)) { }

View File

@ -1,4 +1,5 @@
// @target: es2015
// @strict: false
// @target: es2015
function f() {
var a, b, c;
if (a < b && b > (c + 1)) { }

Some files were not shown because too many files have changed in this diff Show More