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

Model's object properties set by const literals not detected #250

Closed
rlexa opened this issue May 15, 2018 · 2 comments
Closed

Model's object properties set by const literals not detected #250

rlexa opened this issue May 15, 2018 · 2 comments

Comments

@rlexa
Copy link

@rlexa rlexa commented May 15, 2018

When model is an object with properties set by const literals (possible at the very least in Angular 6) the template signals an error because the extension doesn't seem to detect those properties.

Model Type:

const KEY_FLAGS = 'flags';
export interface Model {
  id: number;
  [KEY_FLAGS]: number[];
}

In Component:

@Input() data: Model;

In Template:

<label>{{ data.id }}</label>
<label>{{ data.flags }}</label> <!-- this fails -->
@deftomat

This comment has been minimized.

Copy link

@deftomat deftomat commented Aug 6, 2018

The same issue even with the simple index types:

export interface Model {
  [key: string]: number[];
}

(+1 for React where everything is just a TypeScript/JavaScript and extensions like this are not necessary)

@kyliau

This comment has been minimized.

Copy link
Member

@kyliau kyliau commented Nov 12, 2019

This is similar to #110
Will track progress in that ticket.

@kyliau kyliau closed this Nov 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.