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

.length as Class property name #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

carlos-r-l-rodrigues
Copy link

No description provided.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 1ee112a on carlos-r-l-rodrigues:master into f290426 on RemyJeancolas:master.

@RemyJeancolas
Copy link
Owner

Hi @carlos-r-l-rodrigues, thanks for your PR 😃
I'm not really sure why we need this though, could you give me a use case please ?

@carlos-r-l-rodrigues
Copy link
Author

carlos-r-l-rodrigues commented Feb 7, 2019

I'd like to have something like this:

export class Parcel {
    @PropertyCheck()
    public length: number;
    @PropertyCheck()
    public width: number;
    @PropertyCheck()
    public height: number;
    @PropertyCheck()
    public weight: number;
}

It actually avoid any kind of issue with "reserved" properties like:

class Bar {
    @PropertyCheck()
    public __proto__: number;
}

this would be ignored by the current code...

@RemyJeancolas RemyJeancolas force-pushed the master branch 2 times, most recently from 96e7741 to e750a4f Compare August 3, 2022 13:51
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

Successfully merging this pull request may close these issues.

3 participants