2014-07-13 01:04:16 +02:00
|
|
|
/// <reference path="fourslash.ts"/>
|
|
|
|
|
|
|
|
////var x = [1, 2, 3];
|
2014-10-07 20:30:27 +02:00
|
|
|
////var /*y*/y = /*1*/x.pop(5)/*2*/;
|
2014-07-13 01:04:16 +02:00
|
|
|
////
|
|
|
|
|
|
|
|
verify.errorExistsBetweenMarkers("1", "2");
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.numberOfErrorsInCurrentFile(1);
|
2014-07-13 01:04:16 +02:00
|
|
|
// Expected errors are:
|
|
|
|
// - Supplied parameters do not match any signature of call target.
|
|
|
|
// - Could not select overload for 'call' expression.
|
|
|
|
|
|
|
|
goTo.marker("y");
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs("(var) y: any");
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
goTo.eof();
|
|
|
|
edit.insert("interface Array<T> { pop(def: T): T; }");
|
|
|
|
|
|
|
|
verify.not.errorExistsBetweenMarkers("1", "2");
|
|
|
|
goTo.marker("y");
|
2014-10-07 20:30:27 +02:00
|
|
|
verify.quickInfoIs("(var) y: number");
|
2014-07-13 01:04:16 +02:00
|
|
|
verify.numberOfErrorsInCurrentFile(0);
|