Skip to content

definition of more types for a property #825

Closed
@lucamorelli

Description

@lucamorelli

Hi,
I just opened this issue DefinitelyTyped/DefinitelyTyped#2923 about the columndef property of nggrid.
In this case normally the property is set as an array of IColumnDef objects but when you need to assign this property the content of another field in the scope, I have to write a string with the name of the field and this way I can set the properties dynamically, because the grid can handle the changes in the object list.
At the moment I solved changing to any, but it's not the first time I see the use of any because a field is used in a couple of different ways.
Exists a way to define a field with a limited set of data type?
The first similar thing I think is the old C struct, used to write in a different way the same memory location.
May be nice because this way you can have the flexibility to use in a different way the same entity and strict typing.

Luca

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions