Add importHelpers directive and fix line endings

Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-06-24 17:25:02 +00:00
parent 6fead4671c
commit 2738f69f57
11 changed files with 78 additions and 32 deletions

View File

@ -1,7 +1,7 @@
usingDeclarationsInForOfShadowing.ts(12,7): error TS2481: Cannot initialize outer scoped variable 'baz' in the same scope as block scoped declaration 'baz'.
main.ts(12,7): error TS2481: Cannot initialize outer scoped variable 'baz' in the same scope as block scoped declaration 'baz'.
==== usingDeclarationsInForOfShadowing.ts (1 errors) ====
==== main.ts (1 errors) ====
class Foo {}
for (using foo of []) {
@ -16,4 +16,8 @@ usingDeclarationsInForOfShadowing.ts(12,7): error TS2481: Cannot initialize oute
var baz = 42;
~~~
!!! error TS2481: Cannot initialize outer scoped variable 'baz' in the same scope as block scoped declaration 'baz'.
}
}
==== tslib.d.ts (0 errors) ====
export declare function __addDisposableResource<T>(env: any, value: T, async: boolean): T;
export declare function __disposeResources(env: any): void;

View File

@ -1,6 +1,6 @@
//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsInForOfShadowing.ts] ////
//// [usingDeclarationsInForOfShadowing.ts]
//// [main.ts]
class Foo {}
for (using foo of []) {
@ -13,9 +13,13 @@ for (using bar of []) {
for (using baz of []) {
var baz = 42;
}
}
//// [usingDeclarationsInForOfShadowing.js]
//// [tslib.d.ts]
export declare function __addDisposableResource<T>(env: any, value: T, async: boolean): T;
export declare function __disposeResources(env: any): void;
//// [main.js]
var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
if (value !== null && value !== void 0) {
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");

View File

@ -1,7 +1,7 @@
usingDeclarationsInForOfShadowing.ts(12,7): error TS2481: Cannot initialize outer scoped variable 'baz' in the same scope as block scoped declaration 'baz'.
main.ts(12,7): error TS2481: Cannot initialize outer scoped variable 'baz' in the same scope as block scoped declaration 'baz'.
==== usingDeclarationsInForOfShadowing.ts (1 errors) ====
==== main.ts (1 errors) ====
class Foo {}
for (using foo of []) {
@ -16,4 +16,8 @@ usingDeclarationsInForOfShadowing.ts(12,7): error TS2481: Cannot initialize oute
var baz = 42;
~~~
!!! error TS2481: Cannot initialize outer scoped variable 'baz' in the same scope as block scoped declaration 'baz'.
}
}
==== tslib.d.ts (0 errors) ====
export declare function __addDisposableResource<T>(env: any, value: T, async: boolean): T;
export declare function __disposeResources(env: any): void;

View File

@ -1,6 +1,6 @@
//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsInForOfShadowing.ts] ////
//// [usingDeclarationsInForOfShadowing.ts]
//// [main.ts]
class Foo {}
for (using foo of []) {
@ -13,9 +13,13 @@ for (using bar of []) {
for (using baz of []) {
var baz = 42;
}
}
//// [usingDeclarationsInForOfShadowing.js]
//// [tslib.d.ts]
export declare function __addDisposableResource<T>(env: any, value: T, async: boolean): T;
export declare function __disposeResources(env: any): void;
//// [main.js]
var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
if (value !== null && value !== void 0) {
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");

View File

@ -1,7 +1,7 @@
usingDeclarationsInForOfShadowing.ts(12,7): error TS2481: Cannot initialize outer scoped variable 'baz' in the same scope as block scoped declaration 'baz'.
main.ts(12,7): error TS2481: Cannot initialize outer scoped variable 'baz' in the same scope as block scoped declaration 'baz'.
==== usingDeclarationsInForOfShadowing.ts (1 errors) ====
==== main.ts (1 errors) ====
class Foo {}
for (using foo of []) {
@ -16,4 +16,8 @@ usingDeclarationsInForOfShadowing.ts(12,7): error TS2481: Cannot initialize oute
var baz = 42;
~~~
!!! error TS2481: Cannot initialize outer scoped variable 'baz' in the same scope as block scoped declaration 'baz'.
}
}
==== tslib.d.ts (0 errors) ====
export declare function __addDisposableResource<T>(env: any, value: T, async: boolean): T;
export declare function __disposeResources(env: any): void;

View File

@ -1,6 +1,6 @@
//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsInForOfShadowing.ts] ////
//// [usingDeclarationsInForOfShadowing.ts]
//// [main.ts]
class Foo {}
for (using foo of []) {
@ -13,9 +13,13 @@ for (using bar of []) {
for (using baz of []) {
var baz = 42;
}
}
//// [usingDeclarationsInForOfShadowing.js]
//// [tslib.d.ts]
export declare function __addDisposableResource<T>(env: any, value: T, async: boolean): T;
export declare function __disposeResources(env: any): void;
//// [main.js]
var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
if (value !== null && value !== void 0) {
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");

View File

@ -1,7 +1,7 @@
usingDeclarationsInForOfShadowing.ts(12,7): error TS2481: Cannot initialize outer scoped variable 'baz' in the same scope as block scoped declaration 'baz'.
main.ts(12,7): error TS2481: Cannot initialize outer scoped variable 'baz' in the same scope as block scoped declaration 'baz'.
==== usingDeclarationsInForOfShadowing.ts (1 errors) ====
==== main.ts (1 errors) ====
class Foo {}
for (using foo of []) {
@ -16,4 +16,8 @@ usingDeclarationsInForOfShadowing.ts(12,7): error TS2481: Cannot initialize oute
var baz = 42;
~~~
!!! error TS2481: Cannot initialize outer scoped variable 'baz' in the same scope as block scoped declaration 'baz'.
}
}
==== tslib.d.ts (0 errors) ====
export declare function __addDisposableResource<T>(env: any, value: T, async: boolean): T;
export declare function __disposeResources(env: any): void;

View File

@ -1,6 +1,6 @@
//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsInForOfShadowing.ts] ////
//// [usingDeclarationsInForOfShadowing.ts]
//// [main.ts]
class Foo {}
for (using foo of []) {
@ -13,9 +13,13 @@ for (using bar of []) {
for (using baz of []) {
var baz = 42;
}
}
//// [usingDeclarationsInForOfShadowing.js]
//// [tslib.d.ts]
export declare function __addDisposableResource<T>(env: any, value: T, async: boolean): T;
export declare function __disposeResources(env: any): void;
//// [main.js]
var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
if (value !== null && value !== void 0) {
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");

View File

@ -1,7 +1,7 @@
usingDeclarationsInForOfShadowing.ts(12,7): error TS2481: Cannot initialize outer scoped variable 'baz' in the same scope as block scoped declaration 'baz'.
main.ts(12,7): error TS2481: Cannot initialize outer scoped variable 'baz' in the same scope as block scoped declaration 'baz'.
==== usingDeclarationsInForOfShadowing.ts (1 errors) ====
==== main.ts (1 errors) ====
class Foo {}
for (using foo of []) {
@ -16,4 +16,8 @@ usingDeclarationsInForOfShadowing.ts(12,7): error TS2481: Cannot initialize oute
var baz = 42;
~~~
!!! error TS2481: Cannot initialize outer scoped variable 'baz' in the same scope as block scoped declaration 'baz'.
}
}
==== tslib.d.ts (0 errors) ====
export declare function __addDisposableResource<T>(env: any, value: T, async: boolean): T;
export declare function __disposeResources(env: any): void;

View File

@ -1,6 +1,6 @@
//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsInForOfShadowing.ts] ////
//// [usingDeclarationsInForOfShadowing.ts]
//// [main.ts]
class Foo {}
for (using foo of []) {
@ -13,9 +13,13 @@ for (using bar of []) {
for (using baz of []) {
var baz = 42;
}
}
//// [usingDeclarationsInForOfShadowing.js]
//// [tslib.d.ts]
export declare function __addDisposableResource<T>(env: any, value: T, async: boolean): T;
export declare function __disposeResources(env: any): void;
//// [main.js]
class Foo {
}
for (using foo of []) {

View File

@ -1,8 +1,10 @@
// @target: esnext,es2022,es2017,es2015,es5
// @module: esnext
// @module: commonjs
// @lib: esnext
// @importHelpers: true
// @noTypesAndSymbols: true
// @filename: main.ts
class Foo {}
for (using foo of []) {
@ -15,4 +17,8 @@ for (using bar of []) {
for (using baz of []) {
var baz = 42;
}
}
// @filename: tslib.d.ts
export declare function __addDisposableResource<T>(env: any, value: T, async: boolean): T;
export declare function __disposeResources(env: any): void;