Everything already works as expected in my code. What I'm wanting is to make it verbose, making method signatures more self-explanatory (I know I can use Doc comments for this, but I'd also like to use TypeScript types) and can be better validated by TSLint 's life.
What I have today:
class Test{
testMetadada<T>(expression: (t: T) => void) {
// ...
}
}
The object expression
is of type (t: T) => void
, which is not very explanatory, I would like for example that something like:
class Expression<T> extends (t: T) => void{
}
or
interface Expression<T> extends (t: T) => void{
}
or
let Expression = ((t: T) => void)<T>;
For my method to be something like:
class Test{
testMetadada<T>(expression: Expression) {
// ...
}
}
Where Expression
represents the same function (t: T) => void
.
Is there anything I can do in this regard?
See # (% 2)% 20% 3A% 22% 3B% 0D% 0A% 0D% 0Adocument.body.appendChild (h1)% 3B " the ability to use TypeScript
Arrow function
> as expressions