TypeScript/tests/cases/fourslash/getPreProcessedFile.ts

32 lines
1 KiB
TypeScript
Raw Normal View History

2014-10-29 21:58:27 +01:00
/// <reference path="fourslash.ts" />
2016-02-13 00:40:47 +01:00
// @ModuleResolution: classic
2014-10-29 21:58:27 +01:00
// @Filename: refFile1.ts
//// class D { }
// @Filename: refFile2.ts
//// export class E {}
2014-10-29 21:58:27 +01:00
// @Filename: main.ts
// @ResolveReference: true
//// ///<reference path="refFile1.ts" />
//// ///<reference path = "/*1*/NotExistRef.ts/*2*/" />
2014-10-29 21:58:27 +01:00
//// /*3*////<reference path "invalidRefFile1.ts" />/*4*/
//// import ref2 = require("refFile2");
//// import noExistref2 = require(/*5*/"NotExistRefFile2"/*6*/);
//// import invalidRef1 /*7*/require/*8*/("refFile2");
2015-03-02 22:58:07 +01:00
//// import invalidRef2 = /*9*/requi/*10*/(/*10A*/"refFile2");
2014-10-29 21:58:27 +01:00
//// var obj: /*11*/C/*12*/;
//// var obj1: D;
//// var obj2: ref2.E;
goTo.file("main.ts");
verify.numberOfErrorsInCurrentFile(7);
verify.errorExistsBetweenMarkers("1", "2");
verify.errorExistsBetweenMarkers("3", "4");
verify.errorExistsBetweenMarkers("5", "6");
verify.errorExistsBetweenMarkers("7", "8");
2015-03-02 22:58:07 +01:00
verify.errorExistsBetweenMarkers("9", "10");
verify.errorExistsBetweenMarkers("10", "10A");
2014-10-29 21:58:27 +01:00
verify.errorExistsBetweenMarkers("11", "12");