Skip to content
This repository has been archived by the owner on Mar 5, 2018. It is now read-only.

Bind Component to 'this' of templates #7

Open
LPGhatguy opened this issue May 31, 2016 · 0 comments
Open

Bind Component to 'this' of templates #7

LPGhatguy opened this issue May 31, 2016 · 0 comments

Comments

@LPGhatguy
Copy link
Owner

LPGhatguy commented May 31, 2016

TypeScript 2.0 is going to introduce this-typing. Components right now look like this:

const view = (component: Component) => `
    view code
`;

With this new capability, a more consistent name (this) could be used at the expense of using the longer function syntax:

function view(this: Component) {
    return `
        view code
    `;
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant