mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
Add importHelpers directive and fix line endings
Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>
This commit is contained in:
parent
6fead4671c
commit
2738f69f57
@ -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;
|
||||
@ -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.");
|
||||
|
||||
@ -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;
|
||||
@ -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.");
|
||||
|
||||
@ -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;
|
||||
@ -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.");
|
||||
|
||||
@ -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;
|
||||
@ -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.");
|
||||
|
||||
@ -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;
|
||||
@ -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 []) {
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user