mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-22 22:55:36 -05:00
Merge branch 'master' into objectLiteralCompletion
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
EmitOutputStatus : Succeeded
|
||||
Filename : declSingleFile.js
|
||||
var x = 5;
|
||||
var Bar = (function () {
|
||||
function Bar() {
|
||||
}
|
||||
return Bar;
|
||||
})();
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
EmitOutputStatus : JSGeneratedWithSemanticErrors
|
||||
Filename : declSingleFile.js
|
||||
var x = 5;
|
||||
var Bar = (function () {
|
||||
function Bar() {
|
||||
}
|
||||
return Bar;
|
||||
})();
|
||||
var x = "world";
|
||||
var Bar2 = (function () {
|
||||
function Bar2() {
|
||||
}
|
||||
return Bar2;
|
||||
})();
|
||||
|
||||
@@ -5,28 +5,4 @@ exports.bar = "hello world";
|
||||
Filename : tests/cases/fourslash/inputFile3.d.ts
|
||||
export declare var foo: number;
|
||||
export declare var bar: string;
|
||||
Filename : declSingleFile.js
|
||||
var x = 5;
|
||||
var Bar = (function () {
|
||||
function Bar() {
|
||||
}
|
||||
return Bar;
|
||||
})();
|
||||
var x1 = "hello world";
|
||||
var Foo = (function () {
|
||||
function Foo() {
|
||||
}
|
||||
return Foo;
|
||||
})();
|
||||
Filename : declSingleFile.d.ts
|
||||
declare var x: number;
|
||||
declare class Bar {
|
||||
x: string;
|
||||
y: number;
|
||||
}
|
||||
declare var x1: string;
|
||||
declare class Foo {
|
||||
x: string;
|
||||
y: number;
|
||||
}
|
||||
|
||||
|
||||
19
tests/cases/fourslash/getEmitOutputExternalModule.ts
Normal file
19
tests/cases/fourslash/getEmitOutputExternalModule.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
// @BaselineFile: getEmitOutputExternalModule.baseline
|
||||
// @out: declSingleFile.js
|
||||
|
||||
// @Filename: inputFile1.ts
|
||||
// @emitThisFile: true
|
||||
//// var x: number = 5;
|
||||
//// class Bar {
|
||||
//// x : string;
|
||||
//// y : number
|
||||
//// }
|
||||
|
||||
// @Filename: inputFile2.ts
|
||||
//// export module M {
|
||||
//// class C {c}
|
||||
//// }
|
||||
|
||||
verify.baselineGetEmitOutput();
|
||||
26
tests/cases/fourslash/getEmitOutputExternalModule2.ts
Normal file
26
tests/cases/fourslash/getEmitOutputExternalModule2.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
// @BaselineFile: getEmitOutputExternalModule2.baseline
|
||||
// @out: declSingleFile.js
|
||||
|
||||
// @Filename: inputFile1.ts
|
||||
//// var x: number = 5;
|
||||
//// class Bar {
|
||||
//// x : string;
|
||||
//// y : number
|
||||
//// }
|
||||
|
||||
// @Filename: inputFile2.ts
|
||||
// @emitThisFile: true
|
||||
//// var x: string = "world";
|
||||
//// class Bar2 {
|
||||
//// x : string;
|
||||
//// y : number
|
||||
//// }
|
||||
|
||||
// @Filename: inputFile3.ts
|
||||
//// export module M {
|
||||
//// class C {c}
|
||||
//// }
|
||||
|
||||
verify.baselineGetEmitOutput();
|
||||
30
tests/cases/fourslash/navigationItemsOverloads1.ts
Normal file
30
tests/cases/fourslash/navigationItemsOverloads1.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
/// <reference path="fourslash.ts"/>
|
||||
|
||||
////function overload(a: string): boolean;
|
||||
////function overload(b: boolean): boolean;
|
||||
////function overload(b: number): boolean;
|
||||
////function overload(f: typeof overload): boolean;
|
||||
////function overload(x: any, b = (function overload() { return false })): boolean {
|
||||
//// throw overload;
|
||||
////}
|
||||
////
|
||||
////interface I {
|
||||
//// interfaceMethodSignature(a: string): boolean;
|
||||
//// interfaceMethodSignature(b: boolean): boolean;
|
||||
//// interfaceMethodSignature(b: number): boolean;
|
||||
//// interfaceMethodSignature(f: I): boolean;
|
||||
////}
|
||||
////
|
||||
////class C {
|
||||
//// methodOverload(a: string): boolean;
|
||||
//// methodOverload(b: boolean): boolean;
|
||||
//// methodOverload(b: number): boolean;
|
||||
//// methodOverload(f: I): boolean;
|
||||
//// methodOverload(x: any, b = (function overload() { return false })): boolean {
|
||||
//// throw C;
|
||||
//// }
|
||||
////}
|
||||
|
||||
verify.navigationItemsListCount(1, "overload", "exact");
|
||||
verify.navigationItemsListCount(1, "interfaceMethodSignature", "exact");
|
||||
verify.navigationItemsListCount(1, "methodOverload", "exact");
|
||||
12
tests/cases/fourslash/navigationItemsOverloads2.ts
Normal file
12
tests/cases/fourslash/navigationItemsOverloads2.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
/// <reference path="fourslash.ts"/>
|
||||
|
||||
////interface I {
|
||||
//// interfaceMethodSignature(a: string): boolean;
|
||||
//// interfaceMethodSignature(b: number): boolean;
|
||||
//// interfaceMethodSignature(f: I): boolean;
|
||||
////}
|
||||
////interface I {
|
||||
//// interfaceMethodSignature(b: boolean): boolean;
|
||||
////}
|
||||
|
||||
verify.navigationItemsListCount(2, "interfaceMethodSignature", "exact");
|
||||
29
tests/cases/fourslash/navigationItemsOverloadsBroken1.ts
Normal file
29
tests/cases/fourslash/navigationItemsOverloadsBroken1.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
/// <reference path="fourslash.ts"/>
|
||||
|
||||
////function overload1(a: string): boolean;
|
||||
////function overload1(b: boolean): boolean;
|
||||
////function overload1(b: number): boolean;
|
||||
////
|
||||
////var heyImNotInterruptingAnythingAmI = '?';
|
||||
////
|
||||
////function overload1(f: typeof overload): boolean;
|
||||
////function overload1(x: any, b = (function overload() { return false })): boolean {
|
||||
//// throw overload;
|
||||
////}
|
||||
|
||||
////function overload2(a: string): boolean;
|
||||
////function overload2(b: boolean): boolean;
|
||||
////function overload2(b: number): boolean;
|
||||
////
|
||||
////function iJustRuinEverything(x: any, b = (function overload() { return false })): boolean {
|
||||
//// throw overload;
|
||||
////}
|
||||
////
|
||||
////function overload2(f: typeof overload): boolean;
|
||||
////function overload2(x: any, b = (function overload() { return false })): boolean {
|
||||
//// throw overload;
|
||||
////}
|
||||
|
||||
verify.navigationItemsListCount(2, "overload1", "exact");
|
||||
verify.navigationItemsListCount(2, "overload2", "exact");
|
||||
verify.navigationItemsListCount(4, "overload", "prefix");
|
||||
23
tests/cases/fourslash/navigationItemsOverloadsBroken2.ts
Normal file
23
tests/cases/fourslash/navigationItemsOverloadsBroken2.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
/// <reference path="fourslash.ts"/>
|
||||
|
||||
////function overload1(a: string): boolean;
|
||||
////function overload1(b: boolean): boolean;
|
||||
////function overload1(x: any, b = (function overload() { return false })): boolean {
|
||||
//// throw overload1;
|
||||
////}
|
||||
////function overload1(b: number): boolean;
|
||||
////function overload1(f: typeof overload): boolean;
|
||||
|
||||
////function overload2(a: string): boolean;
|
||||
////function overload2(b: boolean): boolean;
|
||||
////function overload2(x: any, b = (function overload() { return false })): boolean {
|
||||
//// function overload2(): boolean;
|
||||
//// function overload2(x: any): boolean;
|
||||
//// throw overload2;
|
||||
////}
|
||||
////function overload2(b: number): boolean;
|
||||
////function overload2(f: typeof overload): boolean;
|
||||
|
||||
verify.navigationItemsListCount(1, "overload1", "exact");
|
||||
verify.navigationItemsListCount(3, "overload2", "exact");
|
||||
verify.navigationItemsListCount(4, "overload", "prefix");
|
||||
Reference in New Issue
Block a user