mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge branch 'master' into constructorAccessibility
This commit is contained in:
+3
-3
@@ -28,9 +28,9 @@ build.json
|
||||
*.actual
|
||||
tests/webhost/*.d.ts
|
||||
tests/webhost/webtsc.js
|
||||
tests/**/*.js
|
||||
tests/**/*.js.map
|
||||
tests/**/*.d.ts
|
||||
tests/cases/**/*.js
|
||||
tests/cases/**/*.js.map
|
||||
tests/cases/**/*.d.ts
|
||||
*.config
|
||||
scripts/debug.bat
|
||||
scripts/run.bat
|
||||
|
||||
@@ -100,7 +100,7 @@ namespace ts {
|
||||
|
||||
let moduleResolution = compilerOptions.moduleResolution;
|
||||
if (moduleResolution === undefined) {
|
||||
moduleResolution = compilerOptions.module === ModuleKind.CommonJS ? ModuleResolutionKind.NodeJs : ModuleResolutionKind.Classic;
|
||||
moduleResolution = getEmitModuleKind(compilerOptions) === ModuleKind.CommonJS ? ModuleResolutionKind.NodeJs : ModuleResolutionKind.Classic;
|
||||
if (traceEnabled) {
|
||||
trace(host, Diagnostics.Module_resolution_kind_is_not_specified_using_0, ModuleResolutionKind[moduleResolution]);
|
||||
}
|
||||
|
||||
@@ -387,6 +387,8 @@ namespace ts {
|
||||
case SyntaxKind.FunctionDeclaration:
|
||||
case SyntaxKind.FunctionExpression:
|
||||
case SyntaxKind.MethodDeclaration:
|
||||
case SyntaxKind.GetAccessor:
|
||||
case SyntaxKind.SetAccessor:
|
||||
case SyntaxKind.TypeAliasDeclaration:
|
||||
errorNode = (<Declaration>node).name;
|
||||
break;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames36_ES5.ts(8,5): error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames36_ES5.ts(8,9): error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames36_ES5.ts (1 errors) ====
|
||||
@@ -10,7 +10,7 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames36_ES5.ts(8,
|
||||
|
||||
// Computed properties
|
||||
get ["get1"]() { return new Foo }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~
|
||||
!!! error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
set ["set1"](p: Foo2) { }
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames36_ES6.ts(8,5): error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames36_ES6.ts(8,9): error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames36_ES6.ts (1 errors) ====
|
||||
@@ -10,7 +10,7 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames36_ES6.ts(8,
|
||||
|
||||
// Computed properties
|
||||
get ["get1"]() { return new Foo }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~
|
||||
!!! error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
set ["set1"](p: Foo2) { }
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames38_ES5.ts(8,5): error TS2411: Property '[1 << 6]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames38_ES5.ts(8,9): error TS2411: Property '[1 << 6]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames38_ES5.ts (1 errors) ====
|
||||
@@ -10,7 +10,7 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames38_ES5.ts(8,
|
||||
|
||||
// Computed properties
|
||||
get [1 << 6]() { return new Foo }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~
|
||||
!!! error TS2411: Property '[1 << 6]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
set [1 << 6](p: Foo2) { }
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames38_ES6.ts(8,5): error TS2411: Property '[1 << 6]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames38_ES6.ts(8,9): error TS2411: Property '[1 << 6]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames38_ES6.ts (1 errors) ====
|
||||
@@ -10,7 +10,7 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames38_ES6.ts(8,
|
||||
|
||||
// Computed properties
|
||||
get [1 << 6]() { return new Foo }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~
|
||||
!!! error TS2411: Property '[1 << 6]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
set [1 << 6](p: Foo2) { }
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames39_ES5.ts(8,5): error TS2412: Property '[1 << 6]' of type 'Foo' is not assignable to numeric index type 'Foo2'.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames39_ES5.ts(8,9): error TS2412: Property '[1 << 6]' of type 'Foo' is not assignable to numeric index type 'Foo2'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames39_ES5.ts (1 errors) ====
|
||||
@@ -10,7 +10,7 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames39_ES5.ts(8,
|
||||
|
||||
// Computed properties
|
||||
get [1 << 6]() { return new Foo }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~
|
||||
!!! error TS2412: Property '[1 << 6]' of type 'Foo' is not assignable to numeric index type 'Foo2'.
|
||||
set [1 << 6](p: Foo2) { }
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames39_ES6.ts(8,5): error TS2412: Property '[1 << 6]' of type 'Foo' is not assignable to numeric index type 'Foo2'.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames39_ES6.ts(8,9): error TS2412: Property '[1 << 6]' of type 'Foo' is not assignable to numeric index type 'Foo2'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames39_ES6.ts (1 errors) ====
|
||||
@@ -10,7 +10,7 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames39_ES6.ts(8,
|
||||
|
||||
// Computed properties
|
||||
get [1 << 6]() { return new Foo }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~
|
||||
!!! error TS2412: Property '[1 << 6]' of type 'Foo' is not assignable to numeric index type 'Foo2'.
|
||||
set [1 << 6](p: Foo2) { }
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames43_ES5.ts(10,5): error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames43_ES5.ts(10,9): error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames43_ES5.ts (1 errors) ====
|
||||
@@ -12,7 +12,7 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames43_ES5.ts(10
|
||||
class D extends C {
|
||||
// Computed properties
|
||||
get ["get1"]() { return new Foo }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~
|
||||
!!! error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
set ["set1"](p: Foo2) { }
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames43_ES6.ts(10,5): error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames43_ES6.ts(10,9): error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames43_ES6.ts (1 errors) ====
|
||||
@@ -12,7 +12,7 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames43_ES6.ts(10
|
||||
class D extends C {
|
||||
// Computed properties
|
||||
get ["get1"]() { return new Foo }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~
|
||||
!!! error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
set ["set1"](p: Foo2) { }
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames44_ES5.ts(6,5): error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames44_ES5.ts(10,5): error TS2411: Property '["set1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames44_ES5.ts(6,9): error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames44_ES5.ts(10,9): error TS2411: Property '["set1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames44_ES5.ts (2 errors) ====
|
||||
@@ -9,12 +9,12 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames44_ES5.ts(10
|
||||
class C {
|
||||
[s: string]: Foo2;
|
||||
get ["get1"]() { return new Foo }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~
|
||||
!!! error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
}
|
||||
|
||||
class D extends C {
|
||||
set ["set1"](p: Foo) { }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~
|
||||
!!! error TS2411: Property '["set1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames44_ES6.ts(6,5): error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames44_ES6.ts(10,5): error TS2411: Property '["set1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames44_ES6.ts(6,9): error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames44_ES6.ts(10,9): error TS2411: Property '["set1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames44_ES6.ts (2 errors) ====
|
||||
@@ -9,12 +9,12 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames44_ES6.ts(10
|
||||
class C {
|
||||
[s: string]: Foo2;
|
||||
get ["get1"]() { return new Foo }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~
|
||||
!!! error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
}
|
||||
|
||||
class D extends C {
|
||||
set ["set1"](p: Foo) { }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~
|
||||
!!! error TS2411: Property '["set1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames45_ES5.ts(5,5): error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames45_ES5.ts(11,5): error TS2411: Property '["set1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames45_ES5.ts(5,9): error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames45_ES5.ts(11,9): error TS2411: Property '["set1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames45_ES5.ts (2 errors) ====
|
||||
@@ -8,7 +8,7 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames45_ES5.ts(11
|
||||
|
||||
class C {
|
||||
get ["get1"]() { return new Foo }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~
|
||||
!!! error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
}
|
||||
|
||||
@@ -16,6 +16,6 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames45_ES5.ts(11
|
||||
// No error when the indexer is in a class more derived than the computed property
|
||||
[s: string]: Foo2;
|
||||
set ["set1"](p: Foo) { }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~
|
||||
!!! error TS2411: Property '["set1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames45_ES6.ts(5,5): error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames45_ES6.ts(11,5): error TS2411: Property '["set1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames45_ES6.ts(5,9): error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames45_ES6.ts(11,9): error TS2411: Property '["set1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames45_ES6.ts (2 errors) ====
|
||||
@@ -8,7 +8,7 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames45_ES6.ts(11
|
||||
|
||||
class C {
|
||||
get ["get1"]() { return new Foo }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~
|
||||
!!! error TS2411: Property '["get1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
}
|
||||
|
||||
@@ -16,6 +16,6 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames45_ES6.ts(11
|
||||
// No error when the indexer is in a class more derived than the computed property
|
||||
[s: string]: Foo2;
|
||||
set ["set1"](p: Foo) { }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~
|
||||
!!! error TS2411: Property '["set1"]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||||
}
|
||||
@@ -1,23 +1,21 @@
|
||||
tests/cases/compiler/getAndSetNotIdenticalType.ts(2,5): error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
tests/cases/compiler/getAndSetNotIdenticalType.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/getAndSetNotIdenticalType.ts(5,5): error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
tests/cases/compiler/getAndSetNotIdenticalType.ts(2,9): error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
tests/cases/compiler/getAndSetNotIdenticalType.ts(5,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/getAndSetNotIdenticalType.ts(5,9): error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
|
||||
|
||||
==== tests/cases/compiler/getAndSetNotIdenticalType.ts (4 errors) ====
|
||||
class C {
|
||||
get x(): number {
|
||||
~~~~~~~~~~~~~~~~~
|
||||
~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
~
|
||||
!!! error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
return 1;
|
||||
~~~~~~~~~~~~~~~~~
|
||||
}
|
||||
~~~~~
|
||||
!!! error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
set x(v: string) { }
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
~
|
||||
!!! error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/compiler/getAndSetNotIdenticalType2.ts(5,5): error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
tests/cases/compiler/getAndSetNotIdenticalType2.ts(5,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/getAndSetNotIdenticalType2.ts(8,5): error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
tests/cases/compiler/getAndSetNotIdenticalType2.ts(5,9): error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
tests/cases/compiler/getAndSetNotIdenticalType2.ts(8,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/getAndSetNotIdenticalType2.ts(8,9): error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
tests/cases/compiler/getAndSetNotIdenticalType2.ts(9,9): error TS2322: Type 'A<string>' is not assignable to type 'A<T>'.
|
||||
Type 'string' is not assignable to type 'T'.
|
||||
|
||||
@@ -12,26 +12,22 @@ tests/cases/compiler/getAndSetNotIdenticalType2.ts(9,9): error TS2322: Type 'A<s
|
||||
class C<T> {
|
||||
data: A<T>;
|
||||
get x(): A<T> {
|
||||
~~~~~~~~~~~~~~~
|
||||
~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
return this.data;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
}
|
||||
~~~~~
|
||||
~
|
||||
!!! error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
return this.data;
|
||||
}
|
||||
set x(v: A<string>) {
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
~
|
||||
!!! error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
this.data = v;
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~
|
||||
!!! error TS2322: Type 'A<string>' is not assignable to type 'A<T>'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'T'.
|
||||
}
|
||||
~~~~~
|
||||
!!! error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
}
|
||||
|
||||
var x = new C();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/compiler/getAndSetNotIdenticalType3.ts(5,5): error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
tests/cases/compiler/getAndSetNotIdenticalType3.ts(5,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/getAndSetNotIdenticalType3.ts(8,5): error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
tests/cases/compiler/getAndSetNotIdenticalType3.ts(5,9): error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
tests/cases/compiler/getAndSetNotIdenticalType3.ts(8,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/getAndSetNotIdenticalType3.ts(8,9): error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
tests/cases/compiler/getAndSetNotIdenticalType3.ts(9,9): error TS2322: Type 'A<string>' is not assignable to type 'A<number>'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
|
||||
@@ -12,26 +12,22 @@ tests/cases/compiler/getAndSetNotIdenticalType3.ts(9,9): error TS2322: Type 'A<s
|
||||
class C<T> {
|
||||
data: A<number>;
|
||||
get x(): A<number> {
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
return this.data;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
}
|
||||
~~~~~
|
||||
~
|
||||
!!! error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
return this.data;
|
||||
}
|
||||
set x(v: A<string>) {
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
~
|
||||
!!! error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
this.data = v;
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~
|
||||
!!! error TS2322: Type 'A<string>' is not assignable to type 'A<number>'.
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
||||
}
|
||||
~~~~~
|
||||
!!! error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
}
|
||||
|
||||
var x = new C();
|
||||
|
||||
@@ -8,7 +8,7 @@ tests/cases/compiler/implicitAnyFromCircularInference.ts(23,10): error TS7024: F
|
||||
tests/cases/compiler/implicitAnyFromCircularInference.ts(26,10): error TS7023: 'h' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.
|
||||
tests/cases/compiler/implicitAnyFromCircularInference.ts(28,14): error TS7023: 'foo' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.
|
||||
tests/cases/compiler/implicitAnyFromCircularInference.ts(41,5): error TS7022: 's' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
|
||||
tests/cases/compiler/implicitAnyFromCircularInference.ts(46,5): error TS7023: 'x' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.
|
||||
tests/cases/compiler/implicitAnyFromCircularInference.ts(46,9): error TS7023: 'x' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.
|
||||
|
||||
|
||||
==== tests/cases/compiler/implicitAnyFromCircularInference.ts (11 errors) ====
|
||||
@@ -78,11 +78,9 @@ tests/cases/compiler/implicitAnyFromCircularInference.ts(46,5): error TS7023: 'x
|
||||
class D {
|
||||
// Error expected
|
||||
get x() {
|
||||
~~~~~~~~~
|
||||
return this.x;
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
}
|
||||
~~~~~
|
||||
~
|
||||
!!! error TS7023: 'x' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.
|
||||
return this.x;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts(3,5): error TS7008: Member 'getAndSet' implicitly has an 'any' type.
|
||||
tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts(4,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts(9,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts(15,5): error TS7016: Property 'haveOnlySet' implicitly has type 'any', because its 'set' accessor lacks a type annotation.
|
||||
tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts(15,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts(15,16): error TS7016: Property 'haveOnlySet' implicitly has type 'any', because its 'set' accessor lacks a type annotation.
|
||||
tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts(15,28): error TS7006: Parameter 'newXValue' implicitly has an 'any' type.
|
||||
tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts(20,5): error TS7010: 'haveOnlyGet', which lacks return-type annotation, implicitly has an 'any' return type.
|
||||
tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts(20,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts(20,16): error TS7010: 'haveOnlyGet', which lacks return-type annotation, implicitly has an 'any' return type.
|
||||
|
||||
|
||||
==== tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts (8 errors) ====
|
||||
@@ -30,24 +30,21 @@ tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts(20,16): er
|
||||
|
||||
class SetterOnly {
|
||||
public set haveOnlySet(newXValue) { // error at "haveOnlySet, newXValue"
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
~~~~~~~~~~~
|
||||
!!! error TS7016: Property 'haveOnlySet' implicitly has type 'any', because its 'set' accessor lacks a type annotation.
|
||||
~~~~~~~~~
|
||||
!!! error TS7006: Parameter 'newXValue' implicitly has an 'any' type.
|
||||
}
|
||||
~~~~~
|
||||
!!! error TS7016: Property 'haveOnlySet' implicitly has type 'any', because its 'set' accessor lacks a type annotation.
|
||||
}
|
||||
|
||||
class GetterOnly {
|
||||
public get haveOnlyGet() { // error at "haveOnlyGet"
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
return null;
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
}
|
||||
~~~~~
|
||||
~~~~~~~~~~~
|
||||
!!! error TS7010: 'haveOnlyGet', which lacks return-type annotation, implicitly has an 'any' return type.
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ export module m {
|
||||
}
|
||||
|
||||
//// [importAliasAnExternalModuleInsideAnInternalModule_file1.ts]
|
||||
import r = require('importAliasAnExternalModuleInsideAnInternalModule_file0');
|
||||
import r = require('./importAliasAnExternalModuleInsideAnInternalModule_file0');
|
||||
module m_private {
|
||||
//import r2 = require('m'); // would be error
|
||||
export import C = r; // no error
|
||||
@@ -23,7 +23,7 @@ var m;
|
||||
})(m = exports.m || (exports.m = {}));
|
||||
//// [importAliasAnExternalModuleInsideAnInternalModule_file1.js]
|
||||
"use strict";
|
||||
var r = require('importAliasAnExternalModuleInsideAnInternalModule_file0');
|
||||
var r = require('./importAliasAnExternalModuleInsideAnInternalModule_file0');
|
||||
var m_private;
|
||||
(function (m_private) {
|
||||
//import r2 = require('m'); // would be error
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
=== tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule_file1.ts ===
|
||||
import r = require('importAliasAnExternalModuleInsideAnInternalModule_file0');
|
||||
import r = require('./importAliasAnExternalModuleInsideAnInternalModule_file0');
|
||||
>r : Symbol(r, Decl(importAliasAnExternalModuleInsideAnInternalModule_file1.ts, 0, 0))
|
||||
|
||||
module m_private {
|
||||
>m_private : Symbol(m_private, Decl(importAliasAnExternalModuleInsideAnInternalModule_file1.ts, 0, 78))
|
||||
>m_private : Symbol(m_private, Decl(importAliasAnExternalModuleInsideAnInternalModule_file1.ts, 0, 80))
|
||||
|
||||
//import r2 = require('m'); // would be error
|
||||
export import C = r; // no error
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
=== tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule_file1.ts ===
|
||||
import r = require('importAliasAnExternalModuleInsideAnInternalModule_file0');
|
||||
import r = require('./importAliasAnExternalModuleInsideAnInternalModule_file0');
|
||||
>r : typeof r
|
||||
|
||||
module m_private {
|
||||
|
||||
@@ -89,11 +89,11 @@ tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(39,26)
|
||||
tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(40,13): error TS2300: Duplicate identifier 'a'.
|
||||
tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(40,46): error TS1119: An object literal cannot have property and accessor with the same name.
|
||||
tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(40,46): error TS2300: Duplicate identifier 'a'.
|
||||
tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(43,12): error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(43,43): error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(43,16): error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(43,47): error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(44,29): error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(45,12): error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(45,51): error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(45,16): error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(45,55): error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts (96 errors) ====
|
||||
@@ -322,16 +322,16 @@ tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(45,51)
|
||||
|
||||
// Get and set accessor with mismatched type annotations
|
||||
var g1 = { get a(): number { return 4; }, set a(n: string) { } };
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~
|
||||
!!! error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
~
|
||||
!!! error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
var g2 = { get a() { return 4; }, set a(n: string) { } };
|
||||
~
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
var g3 = { get a(): number { return undefined; }, set a(n: string) { } };
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~
|
||||
!!! error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
~
|
||||
!!! error TS2380: 'get' and 'set' accessor must have the same type.
|
||||
|
||||
@@ -4,7 +4,7 @@ export module m {
|
||||
}
|
||||
|
||||
// @Filename: importAliasAnExternalModuleInsideAnInternalModule_file1.ts
|
||||
import r = require('importAliasAnExternalModuleInsideAnInternalModule_file0');
|
||||
import r = require('./importAliasAnExternalModuleInsideAnInternalModule_file0');
|
||||
module m_private {
|
||||
//import r2 = require('m'); // would be error
|
||||
export import C = r; // no error
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// @ModuleResolution: classic
|
||||
// @Filename: test/foo.d.ts
|
||||
export declare module M2 {
|
||||
export var x: boolean;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
////}
|
||||
|
||||
//@Filename: findAllRefsOnDefinition.ts
|
||||
////import Second = require("findAllRefsOnDefinition-import");
|
||||
////import Second = require("./findAllRefsOnDefinition-import");
|
||||
////
|
||||
////var second = new Second.Test()
|
||||
////second.start();
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
////export = A;
|
||||
|
||||
// @Filename: cloduleAsBaseClass2_1.ts
|
||||
////import B = require('cloduleAsBaseClass2_0');
|
||||
////import B = require('./cloduleAsBaseClass2_0');
|
||||
////class D extends B {
|
||||
//// constructor() {
|
||||
//// super(1);
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
// @Filename: commentsExternalModules_file1.ts
|
||||
/////**This is on import declaration*/
|
||||
////import ex/*9*/tMod = require("commentsExternalModules_file0");
|
||||
////import ex/*9*/tMod = require("./commentsExternalModules_file0");
|
||||
/////*10*/extMod./*11*/m1./*12*/fooExp/*13q*/ort(/*13*/);
|
||||
////var new/*14*/Var = new extMod.m1.m2./*15*/c();
|
||||
|
||||
@@ -69,10 +69,10 @@ verify.memberListContains("i", "var m1.m2.i: m1.m2.c", "i");
|
||||
|
||||
goTo.file("commentsExternalModules_file1.ts");
|
||||
goTo.marker('9');
|
||||
verify.quickInfoIs('import extMod = require("commentsExternalModules_file0")', "This is on import declaration");
|
||||
verify.quickInfoIs('import extMod = require("./commentsExternalModules_file0")', "This is on import declaration");
|
||||
|
||||
goTo.marker('10');
|
||||
verify.completionListContains("extMod", 'import extMod = require("commentsExternalModules_file0")', "This is on import declaration");
|
||||
verify.completionListContains("extMod", 'import extMod = require("./commentsExternalModules_file0")', "This is on import declaration");
|
||||
|
||||
goTo.marker('11');
|
||||
verify.memberListContains("m1", "namespace extMod.m1");
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
// @Filename: commentsImportDeclaration_file1.ts
|
||||
///////<reference path='commentsImportDeclaration_file0.ts'/>
|
||||
/////** Import declaration*/
|
||||
////import /*3*/extMod = require("commentsImportDeclaration_file0/*4*/");
|
||||
////import /*3*/extMod = require("./commentsImportDeclaration_file0/*4*/");
|
||||
////extMod./*6*/m1./*7*/fooEx/*8q*/port(/*8*/);
|
||||
////var new/*9*/Var = new extMod.m1.m2./*10*/c();
|
||||
|
||||
@@ -28,7 +28,7 @@ goTo.marker('2');
|
||||
verify.quickInfoIs("namespace m1", "NamespaceComment");
|
||||
|
||||
goTo.marker('3');
|
||||
verify.quickInfoIs('import extMod = require("commentsImportDeclaration_file0")', "Import declaration");
|
||||
verify.quickInfoIs('import extMod = require("./commentsImportDeclaration_file0")', "Import declaration");
|
||||
|
||||
goTo.marker('6');
|
||||
verify.memberListContains("m1", "namespace extMod.m1");
|
||||
|
||||
@@ -24,11 +24,11 @@
|
||||
|
||||
// @Filename: C.ts
|
||||
////export var cVar = "see!";
|
||||
////export * from "A";
|
||||
////export * from "B"
|
||||
////export * from "./A";
|
||||
////export * from "./B"
|
||||
|
||||
// @Filename: D.ts
|
||||
////import * as c from "C";
|
||||
////import * as c from "./C";
|
||||
////var x = c./**/
|
||||
|
||||
goTo.marker();
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
|
||||
// @Filename: C.ts
|
||||
////export var cVar = "see!";
|
||||
////export * from "A";
|
||||
////export * from "B"
|
||||
////export * from "./A";
|
||||
////export * from "./B"
|
||||
|
||||
// @Filename: D.ts
|
||||
////import * as c from "C";
|
||||
////import * as c from "./C";
|
||||
////var x = c.Inner./**/
|
||||
|
||||
goTo.marker();
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
|
||||
// @Filename: C.ts
|
||||
////export var cVar = "see!";
|
||||
////export * from "A";
|
||||
////export * from "B"
|
||||
////export * from "./A";
|
||||
////export * from "./B"
|
||||
|
||||
// @Filename: D.ts
|
||||
////import * as c from "C";
|
||||
////import * as c from "./C";
|
||||
////var x: c./**/
|
||||
|
||||
goTo.marker();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///<reference path="fourslash.ts" />
|
||||
|
||||
// @ModuleResolution: classic
|
||||
|
||||
// @Filename: A.ts
|
||||
////export interface I1 { one: number }
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
////export function baz() { return 10; }
|
||||
|
||||
// @Filename: m2.ts
|
||||
////export {/*1*/, /*2*/ from "m1"
|
||||
////export {/*3*/} from "m1"
|
||||
////export {foo,/*4*/ from "m1"
|
||||
////export {bar as /*5*/, /*6*/ from "m1"
|
||||
////export {foo, bar, baz as b,/*7*/} from "m1"
|
||||
////export {/*1*/, /*2*/ from "./m1"
|
||||
////export {/*3*/} from "./m1"
|
||||
////export {foo,/*4*/ from "./m1"
|
||||
////export {bar as /*5*/, /*6*/ from "./m1"
|
||||
////export {foo, bar, baz as b,/*7*/} from "./m1"
|
||||
|
||||
function verifyCompletionAtMarker(marker: string, showBuilder: boolean, ...completions: string[]) {
|
||||
goTo.marker(marker);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
// @ModuleResolution: classic
|
||||
|
||||
// @Filename: m1.ts
|
||||
////export var foo: number = 1;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
// @Filename: b.ts
|
||||
////import n = require('a/*1*/');
|
||||
////import n = require('./a/*1*/');
|
||||
////var x = new n.Foo();
|
||||
|
||||
// @Filename: a.ts
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
// @Filename: exportEqualCallableInterface_file1.ts
|
||||
///////<reference path='exportEqualCallableInterface_file0.ts'/>
|
||||
////import test = require('exportEqualCallableInterface_file0');
|
||||
////import test = require('./exportEqualCallableInterface_file0');
|
||||
////var t2: test;
|
||||
////t2./**/
|
||||
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
|
||||
// @Filename: exportEqualTypes_file1.ts
|
||||
///////<reference path='exportEqualTypes_file0.ts'/>
|
||||
////import test = require('exportEqualTypes_file0');
|
||||
////import test = require('./exportEqualTypes_file0');
|
||||
////var t: /*1*/test; // var 't' should be of type 'test'
|
||||
////var /*2*/r1 = t(); // Should return a Date
|
||||
////var /*3*/r2 = t./*4*/foo; // t should have 'foo' in dropdown list and be of type 'string'
|
||||
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs("import test = require('exportEqualTypes_file0')");
|
||||
verify.quickInfoIs("import test = require('./exportEqualTypes_file0')");
|
||||
goTo.marker('2');
|
||||
verify.quickInfoIs('var r1: Date');
|
||||
goTo.marker('3');
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
// @Filename: externalModuleIntellisense_file1.ts
|
||||
///////<reference path='externalModuleIntellisense_file0.ts'/>
|
||||
////import express = require('externalModuleIntellisense_file0');
|
||||
////import express = require('./externalModuleIntellisense_file0');
|
||||
////var x = express();/*1*/
|
||||
|
||||
goTo.marker('1');
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
////export = m2;
|
||||
|
||||
// @Filename: externalModuleWithExportAssignment_file1.ts
|
||||
////import /*1*/a1 = require("externalModuleWithExportAssignment_file0");
|
||||
////import /*1*/a1 = require("./externalModuleWithExportAssignment_file0");
|
||||
////export var /*2*/a = a1;
|
||||
////a./*3*/test1(/*4*/null, null, null);
|
||||
////var /*6*/r1 = a.test2(/*5*/);
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
goTo.file("externalModuleWithExportAssignment_file1.ts");
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs('import a1 = require("externalModuleWithExportAssignment_file0")');
|
||||
verify.quickInfoIs('import a1 = require("./externalModuleWithExportAssignment_file0")');
|
||||
|
||||
goTo.marker('2');
|
||||
verify.quickInfoIs("var a: {\n (): a1.connectExport;\n test1: a1.connectModule;\n test2(): a1.connectModule;\n}", undefined);
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
////}
|
||||
|
||||
//@Filename: findAllRefsOnDefinition.ts
|
||||
////import Second = require("findAllRefsOnDefinition-import");
|
||||
////import Second = require("./findAllRefsOnDefinition-import");
|
||||
////
|
||||
////var second = new Second.Test()
|
||||
////second.start();
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
////}
|
||||
|
||||
//@Filename: findAllRefsOnDefinition2.ts
|
||||
////import Second = require("findAllRefsOnDefinition2-import");
|
||||
////import Second = require("./findAllRefsOnDefinition2-import");
|
||||
////
|
||||
////var start: Second.Test.start;
|
||||
////var stop: Second.Test.stop;
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
////}
|
||||
|
||||
//@Filename: b.ts
|
||||
////import { /*2*/Class } from "a";
|
||||
////import { /*2*/Class } from "./a";
|
||||
////
|
||||
////var c = new /*3*/Class();
|
||||
|
||||
//@Filename: c.ts
|
||||
////export { /*4*/Class } from "a";
|
||||
////export { /*4*/Class } from "./a";
|
||||
|
||||
goTo.file("a.ts");
|
||||
goTo.marker("1");
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
////}
|
||||
|
||||
//@Filename: b.ts
|
||||
////import { /*2*/Class as /*3*/C2} from "a";
|
||||
////import { /*2*/Class as /*3*/C2} from "./a";
|
||||
////
|
||||
////var c = new C2();
|
||||
|
||||
//@Filename: c.ts
|
||||
////export { /*4*/Class as /*5*/C3 } from "a";
|
||||
////export { /*4*/Class as /*5*/C3 } from "./a";
|
||||
|
||||
goTo.file("a.ts");
|
||||
goTo.marker("1");
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
//// export var V = "123"
|
||||
|
||||
// @Filename: main.js
|
||||
//// import ref1 = require("refFile1");
|
||||
//// var ref2 = require("refFile2");
|
||||
//// import ref1 = require("./refFile1");
|
||||
//// var ref2 = require("./refFile2");
|
||||
//// ref1.V./*1*/;
|
||||
//// ref2.V./*2*/;
|
||||
//// var v = { x: require("refFile3") };
|
||||
//// var v = { x: require("./refFile3") };
|
||||
//// v.x./*3*/;
|
||||
//// v.x.V./*4*/;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
// @ModuleResolution: classic
|
||||
|
||||
// @Filename: refFile1.ts
|
||||
//// class D { }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
// @Filename: b.ts
|
||||
////import n = require('a/*1*/');
|
||||
////import n = require('./a/*1*/');
|
||||
////var x = new n.Foo();
|
||||
|
||||
// @Filename: a.ts
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
// @Filename: b.ts
|
||||
////import n = require('a/*1*/');
|
||||
////import n = require('./a/*1*/');
|
||||
////var x = new n.Foo();
|
||||
|
||||
// @Filename: a.ts
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
// @Filename: b.ts
|
||||
////export {/*classAliasDefinition*/Class} from "a";
|
||||
////export {/*classAliasDefinition*/Class} from "./a";
|
||||
|
||||
|
||||
// @Filename: a.ts
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
// @Filename: b.ts
|
||||
////import {/*classAliasDefinition*/Class} from "a";
|
||||
////import {/*classAliasDefinition*/Class} from "./a";
|
||||
|
||||
|
||||
// @Filename: a.ts
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
// @Filename: e.ts
|
||||
//// import {M, /*classAliasDefinition*/C, I} from "d";
|
||||
//// import {M, /*classAliasDefinition*/C, I} from "./d";
|
||||
//// var c = new /*classReference*/C();
|
||||
|
||||
|
||||
// @Filename: d.ts
|
||||
////export * from "c";
|
||||
////export * from "./c";
|
||||
|
||||
|
||||
// @Filename: c.ts
|
||||
////export {Module as M, Class as C, Interface as I} from "b";
|
||||
////export {Module as M, Class as C, Interface as I} from "./b";
|
||||
|
||||
|
||||
// @Filename: b.ts
|
||||
////export * from "a";
|
||||
////export * from "./a";
|
||||
|
||||
|
||||
// @Filename: a.ts
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
// @Filename: b.ts
|
||||
////import {Class as /*classAliasDefinition*/ClassAlias} from "a";
|
||||
////import {Class as /*classAliasDefinition*/ClassAlias} from "./a";
|
||||
|
||||
|
||||
// @Filename: a.ts
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
// @Filename: b.ts
|
||||
////export {Class as /*classAliasDefinition*/ClassAlias} from "a";
|
||||
////export {Class as /*classAliasDefinition*/ClassAlias} from "./a";
|
||||
|
||||
|
||||
// @Filename: a.ts
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
// @Filename: b.ts
|
||||
////import /*moduleAliasDefinition*/alias = require("a");
|
||||
////import /*moduleAliasDefinition*/alias = require("./a");
|
||||
|
||||
|
||||
// @Filename: a.ts
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
// @Filename: b.ts
|
||||
////import /*classAliasDefinition*/defaultExport from "a";
|
||||
////import /*classAliasDefinition*/defaultExport from "./a";
|
||||
|
||||
|
||||
// @Filename: a.ts
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
////export {I as I2};
|
||||
|
||||
// @Filename: goToTypeDefinitioAliases_module2.ts
|
||||
////import {I2 as I3} from "goToTypeDefinitioAliases_module1";
|
||||
////import {I2 as I3} from "./goToTypeDefinitioAliases_module1";
|
||||
////var v1: I3;
|
||||
////export {v1 as v2};
|
||||
|
||||
// @Filename: goToTypeDefinitioAliases_module3.ts
|
||||
////import {/*reference1*/v2 as v3} from "goToTypeDefinitioAliases_module2";
|
||||
////import {/*reference1*/v2 as v3} from "./goToTypeDefinitioAliases_module2";
|
||||
/////*reference2*/v3;
|
||||
|
||||
goTo.marker('reference1');
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
//// var y = 10;
|
||||
|
||||
// @Filename: consumer.js
|
||||
//// var x = require('myMod');
|
||||
//// var x = require('./myMod');
|
||||
//// /**/;
|
||||
|
||||
goTo.file('consumer.js');
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
//// }
|
||||
|
||||
// @Filename: consumer.js
|
||||
//// var x = require('myMod');
|
||||
//// var x = require('./myMod');
|
||||
//// x/**/;
|
||||
|
||||
goTo.file('consumer.js');
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
//// exports.b = true;
|
||||
|
||||
// @Filename: consumer.js
|
||||
//// var x = require('myMod');
|
||||
//// var x = require('./myMod');
|
||||
//// x/**/;
|
||||
|
||||
goTo.file('consumer.js');
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
//// var y = 10;
|
||||
|
||||
// @Filename: consumer.js
|
||||
//// var x = require('myMod');
|
||||
//// var x = require('./myMod');
|
||||
//// /**/;
|
||||
|
||||
goTo.file('consumer.js');
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
////var topic = Topic.One;
|
||||
|
||||
// @Filename: memberListOfEnumFromExternalModule_file1.ts
|
||||
////import t = require('memberListOfEnumFromExternalModule_file0');
|
||||
////import t = require('./memberListOfEnumFromExternalModule_file0');
|
||||
////var topic = t.Topic./*1*/
|
||||
|
||||
goTo.file("memberListOfEnumFromExternalModule_file1.ts");
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
// @Filename: mergedDeclarationsWithExportAssignment1_file1.ts
|
||||
///////<reference path='mergedDeclarationsWithExportAssignment1_file0.ts'/>
|
||||
////import /*1*/Foo = require('mergedDeclarationsWithExportAssignment1_file0');
|
||||
////import /*1*/Foo = require('./mergedDeclarationsWithExportAssignment1_file0');
|
||||
////var /*3*/z = new /*2*/Foo();
|
||||
////var /*5*/r2 = Foo./*4*/x;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
edit.insert('');
|
||||
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs("import Foo = require('mergedDeclarationsWithExportAssignment1_file0')");
|
||||
verify.quickInfoIs("import Foo = require('./mergedDeclarationsWithExportAssignment1_file0')");
|
||||
|
||||
goTo.marker('2');
|
||||
verify.completionListContains('Foo');
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
////}
|
||||
|
||||
// @Filename: quickInfoDisplayPartsExternalModuleAlias_file1.ts
|
||||
////import /*1*/a1 = require(/*mod1*/"quickInfoDisplayPartsExternalModuleAlias_file0");
|
||||
////import /*1*/a1 = require(/*mod1*/"./quickInfoDisplayPartsExternalModuleAlias_file0");
|
||||
////new /*2*/a1.m1.c();
|
||||
////export import /*3*/a2 = require(/*mod2*/"quickInfoDisplayPartsExternalModuleAlias_file0");
|
||||
////export import /*3*/a2 = require(/*mod2*/"./quickInfoDisplayPartsExternalModuleAlias_file0");
|
||||
////new /*4*/a2.m1.c();
|
||||
|
||||
var marker = 0;
|
||||
@@ -24,7 +24,7 @@ function verifyImport(name: string, isExported: boolean) {
|
||||
[{ text: "import", kind: "keyword" }, { text: " ", kind: "space" }, { text: name, kind: "aliasName" },
|
||||
{ text: " ", kind: "space" }, { text: "=", kind: "operator" }, { text: " ", kind: "space" },
|
||||
{ text: "require", kind: "keyword" }, { text: "(", kind: "punctuation" },
|
||||
{ text: "\"quickInfoDisplayPartsExternalModuleAlias_file0\"", kind: "stringLiteral" },
|
||||
{ text: "\"./quickInfoDisplayPartsExternalModuleAlias_file0\"", kind: "stringLiteral" },
|
||||
{ text: ")", kind: "punctuation" }],
|
||||
[]);
|
||||
}
|
||||
@@ -35,7 +35,7 @@ verifyImport("a2", /*isExported*/true);
|
||||
|
||||
function verifyExternalModuleStringLiteral(marker: string) {
|
||||
goTo.marker(marker);
|
||||
verify.verifyQuickInfoDisplayParts("module", "", { start: test.markerByName(marker).position, length: "\"quickInfoDisplayPartsExternalModuleAlias_file0\"".length },
|
||||
verify.verifyQuickInfoDisplayParts("module", "", { start: test.markerByName(marker).position, length: "\"./quickInfoDisplayPartsExternalModuleAlias_file0\"".length },
|
||||
[{ text: "module", kind: "keyword" }, { text: " ", kind: "space" }, { text: "a1", kind: "aliasName" }],
|
||||
[]);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
////export = Foo;
|
||||
|
||||
// @Filename: quickInfoExportAssignmentOfGenericInterface_1.ts
|
||||
////import a = require('quickInfoExportAssignmentOfGenericInterface_0');
|
||||
////import a = require('./quickInfoExportAssignmentOfGenericInterface_0');
|
||||
////export var /*1*/x: a<a<string>>;
|
||||
////x.a;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
////export class a{}
|
||||
|
||||
//@Filename: quickInfoForRequire_input.ts
|
||||
////import a = require("AA/B/*1*/B");
|
||||
////import a = require("./AA/B/*1*/B");
|
||||
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs('module a');
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
// @Filename: app.ts
|
||||
////export import A = require('app');
|
||||
////export import A = require('./app');
|
||||
////export var I = 1;
|
||||
////A./**/I
|
||||
|
||||
goTo.marker();
|
||||
verify.completionListContains("A", "import A = require('app')");
|
||||
verify.completionListContains("A", "import A = require('./app')");
|
||||
verify.completionListContains("I", "var I: number");
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
// @Filename: app.ts
|
||||
////export import A = require('app2');
|
||||
////export import A = require('./app2');
|
||||
////export var I = 1;
|
||||
////A./*1*/Y;
|
||||
////A.B.A.B./*2*/I;
|
||||
|
||||
// @Filename: app2.ts
|
||||
////export import B = require('app');
|
||||
////export import B = require('./app');
|
||||
////export var Y = 1;
|
||||
|
||||
goTo.marker("1");
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
// @ModuleResolution: classic
|
||||
|
||||
// @Filename: refFile1.ts
|
||||
//// class D { }
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
////}
|
||||
|
||||
//@Filename: findAllRefsOnDefinition.ts
|
||||
////import Second = require("findAllRefsOnDefinition-import");
|
||||
////import Second = require("./findAllRefsOnDefinition-import");
|
||||
////
|
||||
////var second = new Second.Test()
|
||||
////second.start();
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
// @ModuleResolution: classic
|
||||
|
||||
// @Filename: refFile1.ts
|
||||
//// class D { }
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
////}
|
||||
|
||||
//@Filename: findAllRefsOnDefinition.ts
|
||||
////import Second = require("findAllRefsOnDefinition-import");
|
||||
////import Second = require("./findAllRefsOnDefinition-import");
|
||||
////
|
||||
////var second = new Second.Test()
|
||||
////second.start();
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
////}
|
||||
|
||||
// @Filename: verifySingleFileEmitOutput1_file1.ts
|
||||
////import f = require("verifySingleFileEmitOutput1_file0");
|
||||
////import f = require("./verifySingleFileEmitOutput1_file0");
|
||||
////var /**/b = new f.A();
|
||||
|
||||
goTo.marker();
|
||||
|
||||
Reference in New Issue
Block a user