mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-09 20:51:43 -06:00
add baselines
This commit is contained in:
parent
00576527bd
commit
cb4a40867e
@ -1,43 +0,0 @@
|
||||
tests/cases/compiler/a.ts(1,1): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
|
||||
tests/cases/compiler/a.ts(2,5): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
|
||||
tests/cases/compiler/a.ts(3,5): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
|
||||
tests/cases/compiler/b.ts(1,7): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
|
||||
tests/cases/compiler/b.ts(4,11): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
|
||||
tests/cases/compiler/b.ts(7,11): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
|
||||
tests/cases/compiler/b.ts(10,8): error TS2304: Cannot find name 'undefined'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/a.ts (3 errors) ====
|
||||
type undefined = string;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
|
||||
var undefined = void 0;
|
||||
~~~~~~~~~
|
||||
!!! error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
|
||||
var undefined = null;
|
||||
~~~~~~~~~
|
||||
!!! error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
|
||||
function p(undefined = 42) {
|
||||
return undefined;
|
||||
}
|
||||
==== tests/cases/compiler/b.ts (4 errors) ====
|
||||
class undefined {
|
||||
~~~~~~~~~
|
||||
!!! error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
|
||||
foo: string;
|
||||
}
|
||||
interface undefined {
|
||||
~~~~~~~~~
|
||||
!!! error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
|
||||
member: number;
|
||||
}
|
||||
namespace undefined {
|
||||
~~~~~~~~~
|
||||
!!! error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
|
||||
export var x = 42;
|
||||
}
|
||||
var x: undefined;
|
||||
~~~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'undefined'.
|
||||
var x: typeof undefined;
|
||||
|
||||
@ -1,42 +0,0 @@
|
||||
//// [tests/cases/compiler/undefinedTypeAssignment.ts] ////
|
||||
|
||||
//// [a.ts]
|
||||
type undefined = string;
|
||||
var undefined = void 0;
|
||||
var undefined = null;
|
||||
function p(undefined = 42) {
|
||||
return undefined;
|
||||
}
|
||||
//// [b.ts]
|
||||
class undefined {
|
||||
foo: string;
|
||||
}
|
||||
interface undefined {
|
||||
member: number;
|
||||
}
|
||||
namespace undefined {
|
||||
export var x = 42;
|
||||
}
|
||||
var x: undefined;
|
||||
var x: typeof undefined;
|
||||
|
||||
|
||||
//// [a.js]
|
||||
var undefined = void 0;
|
||||
var undefined = null;
|
||||
function p(undefined) {
|
||||
if (undefined === void 0) { undefined = 42; }
|
||||
return undefined;
|
||||
}
|
||||
//// [b.js]
|
||||
var undefined = (function () {
|
||||
function undefined() {
|
||||
}
|
||||
return undefined;
|
||||
})();
|
||||
var undefined;
|
||||
(function (undefined) {
|
||||
undefined.x = 42;
|
||||
})(undefined || (undefined = {}));
|
||||
var x;
|
||||
var x;
|
||||
@ -0,0 +1,11 @@
|
||||
tests/cases/compiler/undefinedTypeAssignment1.ts(1,1): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/undefinedTypeAssignment1.ts (1 errors) ====
|
||||
type undefined = string;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
|
||||
function p(undefined = "wat") {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
12
tests/baselines/reference/undefinedTypeAssignment1.js
Normal file
12
tests/baselines/reference/undefinedTypeAssignment1.js
Normal file
@ -0,0 +1,12 @@
|
||||
//// [undefinedTypeAssignment1.ts]
|
||||
type undefined = string;
|
||||
function p(undefined = "wat") {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
|
||||
//// [undefinedTypeAssignment1.js]
|
||||
function p(undefined) {
|
||||
if (undefined === void 0) { undefined = "wat"; }
|
||||
return undefined;
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
tests/cases/compiler/undefinedTypeAssignment2.ts(1,5): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/undefinedTypeAssignment2.ts (1 errors) ====
|
||||
var undefined = void 0;
|
||||
~~~~~~~~~
|
||||
!!! error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
|
||||
|
||||
6
tests/baselines/reference/undefinedTypeAssignment2.js
Normal file
6
tests/baselines/reference/undefinedTypeAssignment2.js
Normal file
@ -0,0 +1,6 @@
|
||||
//// [undefinedTypeAssignment2.ts]
|
||||
var undefined = void 0;
|
||||
|
||||
|
||||
//// [undefinedTypeAssignment2.js]
|
||||
var undefined = void 0;
|
||||
@ -0,0 +1,8 @@
|
||||
tests/cases/compiler/undefinedTypeAssignment3.ts(1,5): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/undefinedTypeAssignment3.ts (1 errors) ====
|
||||
var undefined = null;
|
||||
~~~~~~~~~
|
||||
!!! error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
|
||||
|
||||
6
tests/baselines/reference/undefinedTypeAssignment3.js
Normal file
6
tests/baselines/reference/undefinedTypeAssignment3.js
Normal file
@ -0,0 +1,6 @@
|
||||
//// [undefinedTypeAssignment3.ts]
|
||||
var undefined = null;
|
||||
|
||||
|
||||
//// [undefinedTypeAssignment3.js]
|
||||
var undefined = null;
|
||||
@ -0,0 +1,24 @@
|
||||
tests/cases/compiler/undefinedTypeAssignment4.ts(1,7): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
|
||||
tests/cases/compiler/undefinedTypeAssignment4.ts(4,11): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
|
||||
tests/cases/compiler/undefinedTypeAssignment4.ts(7,11): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/undefinedTypeAssignment4.ts (3 errors) ====
|
||||
class undefined {
|
||||
~~~~~~~~~
|
||||
!!! error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
|
||||
foo: string;
|
||||
}
|
||||
interface undefined {
|
||||
~~~~~~~~~
|
||||
!!! error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
|
||||
member: number;
|
||||
}
|
||||
namespace undefined {
|
||||
~~~~~~~~~
|
||||
!!! error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
|
||||
export var x = 42;
|
||||
}
|
||||
var x: undefined;
|
||||
var y: typeof undefined;
|
||||
|
||||
26
tests/baselines/reference/undefinedTypeAssignment4.js
Normal file
26
tests/baselines/reference/undefinedTypeAssignment4.js
Normal file
@ -0,0 +1,26 @@
|
||||
//// [undefinedTypeAssignment4.ts]
|
||||
class undefined {
|
||||
foo: string;
|
||||
}
|
||||
interface undefined {
|
||||
member: number;
|
||||
}
|
||||
namespace undefined {
|
||||
export var x = 42;
|
||||
}
|
||||
var x: undefined;
|
||||
var y: typeof undefined;
|
||||
|
||||
|
||||
//// [undefinedTypeAssignment4.js]
|
||||
var undefined = (function () {
|
||||
function undefined() {
|
||||
}
|
||||
return undefined;
|
||||
})();
|
||||
var undefined;
|
||||
(function (undefined) {
|
||||
undefined.x = 42;
|
||||
})(undefined || (undefined = {}));
|
||||
var x;
|
||||
var y;
|
||||
Loading…
x
Reference in New Issue
Block a user