How to pass an instance variable into typescript decorator arguments?
<p><a href="https://stackoverflow.com/questions/29775830/how-to-implement-a-typescript-decorator">How to implement a typescript decorator?</a> is a good example about how to use decorator in typescript.</p>

<p>Considering the below case,</p>

<pre><code>class MyClass {
    @enumerable(false)
    get prop() {
        return true;
    }

    @property({required: true}) //here pass constant is no issue
    public startDateString:string;

    @property({afterDate: this.startDateString}) //how to pass startDateString here?
    public endDateString:string;
}

function enumerable(isEnumerable: boolean) {
    return (target: Object, propertyKey: string, descriptor: TypedPropertyDescriptor&lt;any&gt;) =&gt; {
        descriptor.enumerable = isEnumerable;
        return descriptor;
    };
}
</code></pre>

<p>I tried everything but it seems I have no way to pass <code>startDateString</code> into decorator argument. <code>startDateString</code> could be a variable, a function and a reference.</p>