Skip to content

Support type alias #179

@InfiniteLukeOne

Description

@InfiniteLukeOne

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: ''
    };
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions