How to access non static property from static function in typescript
<p>I am mocking the <code>User</code> and need to implement static method <code>findOne</code> which is static so I do not need to extensiate <code>User</code> in my calling class:</p>

<pre><code>export class User implements IUser {

    constructor(public name: string, public password: string) { 

        this.name = 'n';
        this.password = 'p';
    }

    static findOne(login: any, next:Function) {

        if(this.name === login.name) //this points to function not to user

        //code

        return this; //this points to function not to user
    }
}
</code></pre>

<p>But I can't access <code>this</code> from static function <code>findOne</code> is there a ways of doning it in typescript?</p>