TypeScript/tests/cases/conformance/types/thisType/thisTypeErrors2.ts
Nathan Shively-Sanders 67b9647069 Add a variable of type this in constructor body
The test already had a reference to the `this` value, but that doesn't
show that the *type* is allowed.
2015-11-02 10:47:56 -08:00

14 lines
219 B
TypeScript

class Base {
constructor(a: this) {
}
}
class Generic<T> {
}
class Derived {
n: number;
constructor(public host: Generic<this>) {
let self: this = this;
this.n = 12;
}
}