Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support type alias #179

Open
InfiniteLukeOne opened this issue Oct 12, 2017 · 0 comments
Open

Support type alias #179

InfiniteLukeOne opened this issue Oct 12, 2017 · 0 comments

Comments

@InfiniteLukeOne
Copy link

InfiniteLukeOne commented Oct 12, 2017

Consider a view:

<template>
    <input value.bind="data.property1" />
    <input value.bind="data.property2" />
    <input value.bind="data.property3" />
</template>

and a view model:

type Alias = {
    property1: string;
    property2: string;
};

export class ViewModel {
    data: Alias = {
        property1: 'test',
        property2: ''
    };
}

aurelia-template-lint currently ignores the non existing property3.

If the type alias in the view model is changed to an interface, a warning is correctly thrown:

interface Alias {
    property1: string;
    property2: string;
}

export class ViewModel {
    data: Alias = {
        property1: 'test',
        property2: ''
    };
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant