TypeScript/tests/cases/fourslash/getOccurrencesThis.ts
2017-01-18 13:55:31 -08:00

149 lines
3.1 KiB
TypeScript

/// <reference path='fourslash.ts' />
////[|this|];
////[|th/**/is|];
////
////function f() {
//// this;
//// this;
//// () => this;
//// () => {
//// if (this) {
//// this;
//// }
//// else {
//// this.this;
//// }
//// }
//// function inside() {
//// this;
//// (function (_) {
//// this;
//// })(this);
//// }
////}
////
////module m {
//// function f() {
//// this;
//// this;
//// () => this;
//// () => {
//// if (this) {
//// this;
//// }
//// else {
//// this.this;
//// }
//// }
//// function inside() {
//// this;
//// (function (_) {
//// this;
//// })(this);
//// }
//// }
////}
////
////class A {
//// public b = this.method1;
////
//// public method1() {
//// this;
//// this;
//// () => this;
//// () => {
//// if (this) {
//// this;
//// }
//// else {
//// this.this;
//// }
//// }
//// function inside() {
//// this;
//// (function (_) {
//// this;
//// })(this);
//// }
//// }
////
//// private method2() {
//// this;
//// this;
//// () => this;
//// () => {
//// if (this) {
//// this;
//// }
//// else {
//// this.this;
//// }
//// }
//// function inside() {
//// this;
//// (function (_) {
//// this;
//// })(this);
//// }
//// }
////
//// public static staticB = this.staticMethod1;
////
//// public static staticMethod1() {
//// this;
//// this;
//// () => this;
//// () => {
//// if (this) {
//// this;
//// }
//// else {
//// this.this;
//// }
//// }
//// function inside() {
//// this;
//// (function (_) {
//// this;
//// })(this);
//// }
//// }
////
//// private static staticMethod2() {
//// this;
//// this;
//// () => this;
//// () => {
//// if (this) {
//// this;
//// }
//// else {
//// this.this;
//// }
//// }
//// function inside() {
//// this;
//// (function (_) {
//// this;
//// })(this);
//// }
//// }
////}
////
////var x = {
//// f() {
//// this;
//// },
//// g() {
//// this;
//// }
////}
verify.rangesAreOccurrences(false);
goTo.marker();
for (const range of test.ranges()) {
verify.occurrencesAtPositionContains(range, false);
}